@yuneta/gobj-ui 5.11.0 → 5.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,7 +26,7 @@ var __copyProps = (to, from, except, desc) => {
26
26
  }
27
27
  return to;
28
28
  };
29
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
29
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
30
30
  value: mod,
31
31
  enumerable: true
32
32
  }) : target, mod));
@@ -1350,10 +1350,11 @@ function instantiate_menus(gobj, config) {
1350
1350
  let renders = secondary_nav_renders(item, render_to_obj(layout));
1351
1351
  let sub_menu_id = `secondary.${menu_id}.${item.id}`;
1352
1352
  for (let render_cfg of renders) {
1353
- let $c = (0, _yuneta_gobj_js.gobj_read_attr)(instantiate_nav_in_zone(gobj, {
1353
+ let nav = instantiate_nav_in_zone(gobj, {
1354
1354
  items: sub.items,
1355
1355
  render: { [zone_id]: render_cfg }
1356
- }, sub_menu_id, zone_id, "secondary", item.name || ""), "$container");
1356
+ }, sub_menu_id, zone_id, "secondary", item.name || "");
1357
+ let $c = (0, _yuneta_gobj_js.gobj_read_attr)(nav, "$container");
1357
1358
  if ($c) $c.classList.add("is-hidden");
1358
1359
  }
1359
1360
  }
@@ -1370,7 +1371,8 @@ function instantiate_nav_in_zone(gobj, menu, menu_id, zone_id, level, nav_label)
1370
1371
  let render_cfg = menu.render && (menu.render[zone_id] || menu.render["*"]) || { layout: "vertical" };
1371
1372
  if ((0, _yuneta_gobj_js.is_string)(render_cfg)) render_cfg = { layout: render_cfg };
1372
1373
  let layout = render_cfg.layout || "vertical";
1373
- let nav = (0, _yuneta_gobj_js.gobj_create)(`nav_${menu_id.replace(/\./g, "_")}_${zone_id}` + (layout === "backbar" ? "_backbar" : ""), "C_YUI_NAV", {
1374
+ let nav_name = `nav_${menu_id.replace(/\./g, "_")}_${zone_id}` + (layout === "backbar" ? "_backbar" : "");
1375
+ let nav = (0, _yuneta_gobj_js.gobj_create)(nav_name, "C_YUI_NAV", {
1374
1376
  menu_id,
1375
1377
  nav_label: nav_label || "",
1376
1378
  menu_items: menu.items || [],
@@ -1896,14 +1898,15 @@ function build_toolbar_connection_item(gobj, it) {
1896
1898
  attrs.title = tip;
1897
1899
  attrs["data-i18n-title"] = tip;
1898
1900
  }
1901
+ let $dot = (0, _yuneta_gobj_js.createElement2)([
1902
+ "span",
1903
+ { class: "yui-conn-dot" },
1904
+ ""
1905
+ ]);
1899
1906
  let $item = (0, _yuneta_gobj_js.createElement2)([
1900
1907
  "button",
1901
1908
  attrs,
1902
- [(0, _yuneta_gobj_js.createElement2)([
1903
- "span",
1904
- { class: "yui-conn-dot" },
1905
- ""
1906
- ])]
1909
+ [$dot]
1907
1910
  ]);
1908
1911
  if ((it.action && it.action.type || "") !== "") $item.addEventListener("click", (ev) => {
1909
1912
  ev.preventDefault();
@@ -1940,11 +1943,13 @@ function handle_toolbar_action(gobj, item, $trigger) {
1940
1943
  let action = item && item.action || {};
1941
1944
  switch (action.type) {
1942
1945
  case "navigate":
1943
- if (!(0, _yuneta_gobj_js.empty_string)(action.route)) if ((0, _yuneta_gobj_js.gobj_read_attr)(gobj, "use_hash") && !route_restores_url(gobj, action.route)) {
1944
- let h = route_to_hash(action.route);
1945
- if (window.location.hash !== h) window.location.hash = h;
1946
- else navigate_to(gobj, action.route);
1947
- } else navigate_to(gobj, action.route);
1946
+ if (!(0, _yuneta_gobj_js.empty_string)(action.route)) {
1947
+ if ((0, _yuneta_gobj_js.gobj_read_attr)(gobj, "use_hash") && !route_restores_url(gobj, action.route)) {
1948
+ let h = route_to_hash(action.route);
1949
+ if (window.location.hash !== h) window.location.hash = h;
1950
+ else navigate_to(gobj, action.route);
1951
+ } else navigate_to(gobj, action.route);
1952
+ }
1948
1953
  break;
1949
1954
  case "drawer": {
1950
1955
  let op = action.op || "toggle";
@@ -1980,11 +1985,13 @@ function toggle_toolbar_dropdown(gobj, item, action, $trigger) {
1980
1985
  function open_toolbar_dropdown(gobj, item, action, $trigger) {
1981
1986
  let priv = gobj.priv;
1982
1987
  if (!priv || !priv.layers || !priv.layers.popup) return;
1988
+ let aria_key = item && (item.aria_label || item.name || item.id) || "Menu";
1989
+ let i18n_aria = item && (item.aria_label || item.name) || "Menu";
1983
1990
  let $panel = (0, _yuneta_gobj_js.createElement2)(["div", {
1984
1991
  class: "yui-toolbar-dropdown-panel",
1985
1992
  role: "menu",
1986
- "aria-label": item && (item.aria_label || item.name || item.id) || "Menu",
1987
- "data-i18n-aria-label": item && (item.aria_label || item.name) || "Menu",
1993
+ "aria-label": aria_key,
1994
+ "data-i18n-aria-label": i18n_aria,
1988
1995
  "data-toolbar-dropdown-for": item && item.id || ""
1989
1996
  }]);
1990
1997
  let raw_items = (0, _yuneta_gobj_js.is_array)(action.items) ? action.items : [];
@@ -2454,14 +2461,15 @@ function create_gclass$18(gclass_name) {
2454
2461
  null
2455
2462
  ]
2456
2463
  ]]];
2457
- __gclass__$18 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, [
2464
+ const event_types = [
2458
2465
  ["EV_NAV_CLICKED", 0],
2459
2466
  ["EV_DRAWER_CLOSE_REQUESTED", 0],
2460
2467
  ["EV_NAV_ITEM_CLOSE", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_PUBLIC_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS],
2461
2468
  ["EV_ROUTE_REQUESTED", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_PUBLIC_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS],
2462
2469
  ["EV_ROUTE_CHANGED", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_PUBLIC_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS],
2463
2470
  ["EV_LANGUAGE_CHANGED", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_PUBLIC_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS]
2464
- ], states, gmt$18, 0, attrs_table$18, PRIVATE_DATA$18, 0, 0, 0, _yuneta_gobj_js.gclass_flag_t.gcflag_no_check_output_events);
2471
+ ];
2472
+ __gclass__$18 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$18, 0, attrs_table$18, PRIVATE_DATA$18, 0, 0, 0, _yuneta_gobj_js.gclass_flag_t.gcflag_no_check_output_events);
2465
2473
  if (!__gclass__$18) return -1;
2466
2474
  return 0;
2467
2475
  }
@@ -3141,10 +3149,11 @@ function build_dialog(shell, message, buttons, opts) {
3141
3149
  { class: "CONFIRM_FOOT modal-card-foot" },
3142
3150
  $footer_children
3143
3151
  ]);
3152
+ let logical = opts && opts.logical_class ? " " + opts.logical_class : "";
3144
3153
  let $modal = (0, _yuneta_gobj_js.createElement2)([
3145
3154
  "div",
3146
3155
  {
3147
- class: `CONFIRM${opts && opts.logical_class ? " " + opts.logical_class : ""} modal yui-modal yui-confirm is-active is-${type}`,
3156
+ class: `CONFIRM${logical} modal yui-modal yui-confirm is-active is-${type}`,
3148
3157
  role: "dialog",
3149
3158
  "aria-modal": "true"
3150
3159
  },
@@ -3212,6 +3221,33 @@ function yui_shell_confirm_yesno(shell, message, opts) {
3212
3221
  value: "no"
3213
3222
  }], opts).then((v) => v === "yes");
3214
3223
  }
3224
+ /***************************************************************
3225
+ * A DESTRUCTIVE confirmation: the button that does the damage is
3226
+ * red, not blue.
3227
+ *
3228
+ * yui_shell_confirm_yesno() puts its yes in `is-link`, which is
3229
+ * the right colour for "do you want to continue" and the wrong
3230
+ * one for "this deletes an account": the two read the same at a
3231
+ * glance, and the destructive one is the one that must not be
3232
+ * clicked by reflex. The safe answer is also the LAST button,
3233
+ * so Escape, the backdrop and the X all resolve to it.
3234
+ *
3235
+ * Returns a Promise<boolean>: true only if the red button was
3236
+ * pressed.
3237
+ ***************************************************************/
3238
+ function yui_shell_confirm_danger(shell, message, opts) {
3239
+ let confirm_label = opts && opts.confirm_label || "Delete";
3240
+ let cancel_label = opts && opts.cancel_label || "Cancel";
3241
+ if (!opts || !opts.type) opts = Object.assign({}, opts, { type: "danger" });
3242
+ return build_dialog(shell, message, [{
3243
+ label: confirm_label,
3244
+ value: "confirm",
3245
+ kind: "danger"
3246
+ }, {
3247
+ label: cancel_label,
3248
+ value: "cancel"
3249
+ }], opts).then((v) => v === "confirm");
3250
+ }
3215
3251
  function yui_shell_confirm_yesnocancel(shell, message, opts) {
3216
3252
  let yes_label = opts && opts.yes_label || "Yes";
3217
3253
  let no_label = opts && opts.no_label || "No";
@@ -3303,7 +3339,8 @@ var __gclass__$17 = null;
3303
3339
  function mt_create$17(gobj) {
3304
3340
  const subscriber = (0, _yuneta_gobj_js.gobj_read_pointer_attr)(gobj, "subscriber");
3305
3341
  if (subscriber) (0, _yuneta_gobj_js.gobj_subscribe_event)(gobj, null, {}, subscriber);
3306
- (0, _yuneta_gobj_js.gobj_write_attr)(gobj, "window_id", "window-" + (0, _yuneta_gobj_js.clean_name)((0, _yuneta_gobj_js.gobj_short_name)(gobj)));
3342
+ let window_id = "window-" + (0, _yuneta_gobj_js.clean_name)((0, _yuneta_gobj_js.gobj_short_name)(gobj));
3343
+ (0, _yuneta_gobj_js.gobj_write_attr)(gobj, "window_id", window_id);
3307
3344
  let manager = resolve_manager(gobj);
3308
3345
  build_ui$14(gobj);
3309
3346
  if (manager) {
@@ -3323,9 +3360,12 @@ function mt_create$17(gobj) {
3323
3360
  }, gobj);
3324
3361
  } else if ((0, _yuneta_gobj_js.gobj_read_bool_attr)(gobj, "back_dismissable")) {
3325
3362
  let shell = yui_shell_of(gobj);
3326
- if (shell) (0, _yuneta_gobj_js.gobj_write_attr)(gobj, "back_overlay", yui_shell_register_overlay(shell, function() {
3327
- close_window(gobj);
3328
- }, { keep_on_navigate: (0, _yuneta_gobj_js.gobj_read_bool_attr)(gobj, "keep_on_navigate") }));
3363
+ if (shell) {
3364
+ let overlay = yui_shell_register_overlay(shell, function() {
3365
+ close_window(gobj);
3366
+ }, { keep_on_navigate: (0, _yuneta_gobj_js.gobj_read_bool_attr)(gobj, "keep_on_navigate") });
3367
+ (0, _yuneta_gobj_js.gobj_write_attr)(gobj, "back_overlay", overlay);
3368
+ }
3329
3369
  }
3330
3370
  let on_win_resize = function() {
3331
3371
  handleResize(gobj);
@@ -3431,16 +3471,18 @@ function build_default_header(gobj) {
3431
3471
  if ((0, _yuneta_gobj_js.empty_string)(title) && (0, _yuneta_gobj_js.empty_string)(prefix)) return null;
3432
3472
  let icon = (0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "icon");
3433
3473
  let items = [];
3434
- if (!(0, _yuneta_gobj_js.empty_string)(icon)) if (icon.charAt(0) === "<") items.push([
3435
- "span",
3436
- { class: "icon" },
3437
- icon
3438
- ]);
3439
- else items.push([
3440
- "span",
3441
- { class: "icon" },
3442
- [["i", { class: icon }]]
3443
- ]);
3474
+ if (!(0, _yuneta_gobj_js.empty_string)(icon)) {
3475
+ if (icon.charAt(0) === "<") items.push([
3476
+ "span",
3477
+ { class: "icon" },
3478
+ icon
3479
+ ]);
3480
+ else items.push([
3481
+ "span",
3482
+ { class: "icon" },
3483
+ [["i", { class: icon }]]
3484
+ ]);
3485
+ }
3444
3486
  if (!(0, _yuneta_gobj_js.empty_string)(prefix)) items.push([
3445
3487
  "span",
3446
3488
  { class: "WINDOW_TITLE_PREFIX has-text-weight-semibold" },
@@ -4099,7 +4141,7 @@ function create_gclass$17(gclass_name) {
4099
4141
  null
4100
4142
  ]
4101
4143
  ]]];
4102
- __gclass__$17 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, [
4144
+ const event_types = [
4103
4145
  ["EV_WINDOW_TO_CLOSE", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS],
4104
4146
  ["EV_WINDOW_MOVED", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS],
4105
4147
  ["EV_WINDOW_RESIZED", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS],
@@ -4107,7 +4149,8 @@ function create_gclass$17(gclass_name) {
4107
4149
  ["EV_SHOW", 0],
4108
4150
  ["EV_HIDE", 0],
4109
4151
  ["EV_CLOSE_WINDOW", 0]
4110
- ], states, gmt$17, 0, attrs_table$17, PRIVATE_DATA$17, 0, 0, 0, 0);
4152
+ ];
4153
+ __gclass__$17 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$17, 0, attrs_table$17, PRIVATE_DATA$17, 0, 0, 0, 0);
4111
4154
  if (!__gclass__$17) return -1;
4112
4155
  return 0;
4113
4156
  }
@@ -4288,11 +4331,12 @@ function ensure_dock_style() {
4288
4331
  ************************************************************/
4289
4332
  function build_dock(gobj) {
4290
4333
  ensure_dock_style();
4291
- (0, _yuneta_gobj_js.gobj_write_attr)(gobj, "$container", (0, _yuneta_gobj_js.createElement2)([
4334
+ let $dock = (0, _yuneta_gobj_js.createElement2)([
4292
4335
  "div",
4293
4336
  { class: "C_YUI_WINDOW_MANAGER yui-dock is-empty" },
4294
4337
  []
4295
- ]));
4338
+ ]);
4339
+ (0, _yuneta_gobj_js.gobj_write_attr)(gobj, "$container", $dock);
4296
4340
  apply_placement(gobj);
4297
4341
  }
4298
4342
  /************************************************************
@@ -4743,7 +4787,7 @@ function mt_destroy$15(gobj) {
4743
4787
  * Build UI
4744
4788
  ************************************************************/
4745
4789
  function build_ui$13(gobj) {
4746
- (0, _yuneta_gobj_js.gobj_write_attr)(gobj, "$container", (0, _yuneta_gobj_js.createElement2)([
4790
+ let $container = (0, _yuneta_gobj_js.createElement2)([
4747
4791
  "div",
4748
4792
  {
4749
4793
  class: "C_YUI_PAGER",
@@ -4812,7 +4856,8 @@ function build_ui$13(gobj) {
4812
4856
  },
4813
4857
  []
4814
4858
  ]]
4815
- ]));
4859
+ ]);
4860
+ (0, _yuneta_gobj_js.gobj_write_attr)(gobj, "$container", $container);
4816
4861
  }
4817
4862
  /************************************************************
4818
4863
  * Destroy UI
@@ -5072,7 +5117,7 @@ function create_gclass$15(gclass_name) {
5072
5117
  null
5073
5118
  ]
5074
5119
  ]]];
5075
- __gclass__$15 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, [
5120
+ const event_types = [
5076
5121
  ["EV_PUSH_PAGE", 0],
5077
5122
  ["EV_POP_PAGE", 0],
5078
5123
  ["EV_BACK", 0],
@@ -5085,7 +5130,8 @@ function create_gclass$15(gclass_name) {
5085
5130
  ["EV_PAGE_SHOWN", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS],
5086
5131
  ["EV_PAGE_DISCARD", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT],
5087
5132
  ["EV_PAGER_EXIT", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT]
5088
- ], states, gmt$15, 0, attrs_table$15, PRIVATE_DATA$15, 0, 0, 0, 0);
5133
+ ];
5134
+ __gclass__$15 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$15, 0, attrs_table$15, PRIVATE_DATA$15, 0, 0, 0, 0);
5089
5135
  if (!__gclass__$15) return -1;
5090
5136
  return 0;
5091
5137
  }
@@ -5275,7 +5321,7 @@ function mt_destroy$14(gobj) {
5275
5321
  * Build UI
5276
5322
  ************************************************************/
5277
5323
  function build_ui$12(gobj) {
5278
- (0, _yuneta_gobj_js.gobj_write_attr)(gobj, "$container", (0, _yuneta_gobj_js.createElement2)([
5324
+ let $container = (0, _yuneta_gobj_js.createElement2)([
5279
5325
  "div",
5280
5326
  {
5281
5327
  class: "C_YUI_WIZARD",
@@ -5361,7 +5407,8 @@ function build_ui$12(gobj) {
5361
5407
  ]]
5362
5408
  ]
5363
5409
  ]
5364
- ]));
5410
+ ]);
5411
+ (0, _yuneta_gobj_js.gobj_write_attr)(gobj, "$container", $container);
5365
5412
  }
5366
5413
  /************************************************************
5367
5414
  * Destroy UI
@@ -5687,7 +5734,7 @@ function create_gclass$14(gclass_name) {
5687
5734
  null
5688
5735
  ]
5689
5736
  ]]];
5690
- __gclass__$14 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, [
5737
+ const event_types = [
5691
5738
  ["EV_SET_STEPS", 0],
5692
5739
  ["EV_NEXT", 0],
5693
5740
  ["EV_PREV", 0],
@@ -5703,7 +5750,8 @@ function create_gclass$14(gclass_name) {
5703
5750
  ["EV_WIZARD_DONE", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT],
5704
5751
  ["EV_WIZARD_CANCEL", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT],
5705
5752
  ["EV_STEP_VALIDATE", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS]
5706
- ], states, gmt$14, 0, attrs_table$14, PRIVATE_DATA$14, 0, 0, 0, 0);
5753
+ ];
5754
+ __gclass__$14 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$14, 0, attrs_table$14, PRIVATE_DATA$14, 0, 0, 0, 0);
5707
5755
  if (!__gclass__$14) return -1;
5708
5756
  return 0;
5709
5757
  }
@@ -5986,7 +6034,8 @@ function mt_create$13(gobj) {
5986
6034
  let subscriber = (0, _yuneta_gobj_js.gobj_read_pointer_attr)(gobj, "subscriber");
5987
6035
  if (!subscriber) subscriber = (0, _yuneta_gobj_js.gobj_parent)(gobj);
5988
6036
  (0, _yuneta_gobj_js.gobj_subscribe_event)(gobj, null, {}, subscriber);
5989
- (0, _yuneta_gobj_js.gobj_write_attr)(gobj, "form_id", "form" + (0, _yuneta_gobj_js.clean_name)((0, _yuneta_gobj_js.gobj_name)(gobj)));
6037
+ let name = (0, _yuneta_gobj_js.clean_name)((0, _yuneta_gobj_js.gobj_name)(gobj));
6038
+ (0, _yuneta_gobj_js.gobj_write_attr)(gobj, "form_id", "form" + name);
5990
6039
  build_ui$11(gobj);
5991
6040
  }
5992
6041
  /************************************************************
@@ -6070,7 +6119,8 @@ function set_changed_stated(gobj, changed) {
6070
6119
  async function readClipboard$1(gobj) {
6071
6120
  try {
6072
6121
  const text = await navigator.clipboard.readText();
6073
- (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_PASTE_RECORD", JSON.parse(text), gobj);
6122
+ let kw = JSON.parse(text);
6123
+ (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_PASTE_RECORD", kw, gobj);
6074
6124
  } catch (error) {
6075
6125
  (0, _yuneta_gobj_js.log_error)(`Failed to read clipboard contents: ${error}`);
6076
6126
  }
@@ -6287,8 +6337,9 @@ function destroy_ui$7(gobj) {
6287
6337
  * Build form with bulma and createElement2
6288
6338
  ******************************************************************/
6289
6339
  function build_form(gobj) {
6340
+ let form_id = (0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "form_id");
6290
6341
  let $form = (0, _yuneta_gobj_js.createElement2)(["form", {
6291
- id: (0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "form_id"),
6342
+ id: form_id,
6292
6343
  class: "yui-form"
6293
6344
  }]);
6294
6345
  let template = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "template");
@@ -6395,7 +6446,6 @@ function build_form_field_conf(gobj, field_desc) {
6395
6446
  case "list":
6396
6447
  field_conf.tag = "select2";
6397
6448
  field_conf.options = field_desc.enum_list;
6398
- break;
6399
6449
  }
6400
6450
  break;
6401
6451
  case "hook": break;
@@ -6432,18 +6482,12 @@ function build_form_field_conf(gobj, field_desc) {
6432
6482
  case "time":
6433
6483
  field_conf.tag = "input";
6434
6484
  field_conf.inputType = "datetime-local";
6435
- switch (field_desc.real_type) {
6436
- case "string": break;
6437
- case "integer": break;
6438
- }
6485
+ field_desc.real_type;
6439
6486
  break;
6440
6487
  case "color":
6441
6488
  field_conf.tag = "input";
6442
6489
  field_conf.inputType = "color";
6443
- switch (field_desc.real_type) {
6444
- case "string": break;
6445
- case "integer": break;
6446
- }
6490
+ field_desc.real_type;
6447
6491
  break;
6448
6492
  case "email":
6449
6493
  field_conf.tag = "input";
@@ -6561,9 +6605,7 @@ function build_fkey_ref$1(gobj, field_desc, value) {
6561
6605
  refs[ref] = true;
6562
6606
  break;
6563
6607
  case "array":
6564
- case "list":
6565
- refs.push(ref);
6566
- break;
6608
+ case "list": refs.push(ref);
6567
6609
  }
6568
6610
  }
6569
6611
  return refs;
@@ -6669,40 +6711,38 @@ function create_form_field(gobj, $form, prefix, field_desc, { tag, inputType, na
6669
6711
  ]]
6670
6712
  ]);
6671
6713
  break;
6672
- default:
6673
- $element = (0, _yuneta_gobj_js.createElement2)([
6714
+ default: $element = (0, _yuneta_gobj_js.createElement2)([
6715
+ "div",
6716
+ { class: "xfield field is-horizontal" },
6717
+ [[
6674
6718
  "div",
6675
- { class: "xfield field is-horizontal" },
6719
+ { class: "field-label is-normal" },
6720
+ [[
6721
+ "label",
6722
+ {
6723
+ class: "label ",
6724
+ i18n: label_i18n || label,
6725
+ for: name
6726
+ },
6727
+ label
6728
+ ]]
6729
+ ], [
6730
+ "div",
6731
+ { class: "field-body" },
6676
6732
  [[
6677
6733
  "div",
6678
- { class: "field-label is-normal" },
6734
+ { class: "field" },
6679
6735
  [[
6680
- "label",
6736
+ "div",
6681
6737
  {
6682
- class: "label ",
6683
- i18n: label_i18n || label,
6684
- for: name
6738
+ class: "xcontrol control",
6739
+ style: ""
6685
6740
  },
6686
- label
6687
- ]]
6688
- ], [
6689
- "div",
6690
- { class: "field-body" },
6691
- [[
6692
- "div",
6693
- { class: "field" },
6694
- [[
6695
- "div",
6696
- {
6697
- class: "xcontrol control",
6698
- style: ""
6699
- },
6700
- []
6701
- ]]
6741
+ []
6702
6742
  ]]
6703
6743
  ]]
6704
- ]);
6705
- break;
6744
+ ]]
6745
+ ]);
6706
6746
  }
6707
6747
  break;
6708
6748
  case "textarea":
@@ -6955,7 +6995,7 @@ function create_form_field(gobj, $form, prefix, field_desc, { tag, inputType, na
6955
6995
  (0, _yuneta_gobj_js.log_error)((0, _yuneta_gobj_js.sprintf)("%s: select field '%s' options not an array (type=%s, real_type=%s); rendering empty", (0, _yuneta_gobj_js.gobj_short_name)(gobj), name, field_desc.type, field_desc.real_type));
6956
6996
  opts = [];
6957
6997
  }
6958
- let $wrapper = (0, _yuneta_gobj_js.createElement2)([
6998
+ let extend = [
6959
6999
  "div",
6960
7000
  { class: "select" },
6961
7001
  [
@@ -6973,7 +7013,8 @@ function create_form_field(gobj, $form, prefix, field_desc, { tag, inputType, na
6973
7013
  (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_RECORD_CHANGED", {}, gobj);
6974
7014
  } }
6975
7015
  ]
6976
- ]);
7016
+ ];
7017
+ let $wrapper = (0, _yuneta_gobj_js.createElement2)(extend);
6977
7018
  $control.appendChild($wrapper);
6978
7019
  $extend = $wrapper.querySelector("select");
6979
7020
  break;
@@ -6984,7 +7025,7 @@ function create_form_field(gobj, $form, prefix, field_desc, { tag, inputType, na
6984
7025
  (0, _yuneta_gobj_js.log_error)((0, _yuneta_gobj_js.sprintf)("%s: select2 field '%s' options not an array (type=%s, real_type=%s); rendering empty", (0, _yuneta_gobj_js.gobj_short_name)(gobj), name, field_desc.type, field_desc.real_type));
6985
7026
  opts = [];
6986
7027
  }
6987
- $extend = (0, _yuneta_gobj_js.createElement2)([
7028
+ let extend = [
6988
7029
  "select",
6989
7030
  {
6990
7031
  name,
@@ -6999,7 +7040,8 @@ function create_form_field(gobj, $form, prefix, field_desc, { tag, inputType, na
6999
7040
  },
7000
7041
  option
7001
7042
  ])
7002
- ]);
7043
+ ];
7044
+ $extend = (0, _yuneta_gobj_js.createElement2)(extend);
7003
7045
  $control.appendChild($extend);
7004
7046
  $extend.tom_select = new tom_select.default($extend, {
7005
7047
  allowEmptyOption: true,
@@ -7037,15 +7079,17 @@ function create_form_field(gobj, $form, prefix, field_desc, { tag, inputType, na
7037
7079
  $extend = $wrapper.querySelector("input");
7038
7080
  break;
7039
7081
  }
7040
- case "radio":
7041
- $extend = (0, _yuneta_gobj_js.createOneHtml)(`
7082
+ case "radio": {
7083
+ let elm = `
7042
7084
  <label class="radio">
7043
7085
  <input type="radio" name="${name}">
7044
7086
  ${(0, i18next.t)(options)}
7045
7087
  </label>
7046
- `);
7088
+ `;
7089
+ $extend = (0, _yuneta_gobj_js.createOneHtml)(elm);
7047
7090
  $control.appendChild($extend);
7048
7091
  break;
7092
+ }
7049
7093
  case "jsoneditor": {
7050
7094
  let attrs = {
7051
7095
  class: "jsoneditor" + (yui_is_dark() ? " jse-theme-dark" : ""),
@@ -7152,9 +7196,7 @@ function create_coordinates(gobj, attrs) {
7152
7196
  case error.TIMEOUT:
7153
7197
  errorMsg = (0, i18next.t)("timed out");
7154
7198
  break;
7155
- default:
7156
- errorMsg = (0, i18next.t)("unknown error");
7157
- break;
7199
+ default: errorMsg = (0, i18next.t)("unknown error");
7158
7200
  }
7159
7201
  $input.classList.add("is-danger");
7160
7202
  let $h = $input.closest(".xcontrol").parentNode.querySelector(".help");
@@ -7169,7 +7211,7 @@ function create_coordinates(gobj, attrs) {
7169
7211
  $h.style.display = "block";
7170
7212
  }
7171
7213
  }
7172
- let $extend = (0, _yuneta_gobj_js.createElement2)([
7214
+ let extend = [
7173
7215
  "div",
7174
7216
  { class: "field is-flex is-align-items-center" },
7175
7217
  [[
@@ -7196,7 +7238,8 @@ function create_coordinates(gobj, attrs) {
7196
7238
  } }
7197
7239
  ]]
7198
7240
  ]]
7199
- ]);
7241
+ ];
7242
+ let $extend = (0, _yuneta_gobj_js.createElement2)(extend);
7200
7243
  let $control = $extend.querySelector(".control");
7201
7244
  attach_clear($control, $control.querySelector("input"));
7202
7245
  return $extend;
@@ -7223,10 +7266,11 @@ function create_tabulator$1(gobj, $extend, name, template) {
7223
7266
  tabulator_settings.columns = template2columns(gobj, columns, template, sub_elements);
7224
7267
  if (sub_elements.length > 0) tabulator_settings.rowFormatter = function(row) {
7225
7268
  for (let sub_element of sub_elements) {
7226
- let $extend = (0, _yuneta_gobj_js.createElement2)(["div", {
7269
+ let extend = ["div", {
7227
7270
  class: "yui-tabulator-table-nested pl-6 is-bordered is-striped",
7228
7271
  "name": sub_element.name
7229
- }]);
7272
+ }];
7273
+ let $extend = (0, _yuneta_gobj_js.createElement2)(extend);
7230
7274
  $extend.tabulator = create_tabulator$1(gobj, $extend, sub_element.name, sub_element.template);
7231
7275
  row.getElement().appendChild($extend);
7232
7276
  }
@@ -7314,9 +7358,10 @@ function template2columns(gobj, columns, template, sub_elements) {
7314
7358
  cellClick: function(evt, cell) {
7315
7359
  evt.stopPropagation();
7316
7360
  let $row = cell.getRow().getElement();
7361
+ let $extend = $row.querySelector(`[name="${field_desc.name}"]`);
7317
7362
  (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_ADD_TABLE_ROW", {
7318
7363
  $row,
7319
- $table: $row.querySelector(`[name="${field_desc.name}"]`),
7364
+ $table: $extend,
7320
7365
  record: {},
7321
7366
  loading: false
7322
7367
  }, gobj);
@@ -7331,9 +7376,7 @@ function template2columns(gobj, columns, template, sub_elements) {
7331
7376
  case "object":
7332
7377
  case "dict":
7333
7378
  case "array":
7334
- case "list":
7335
- column.editorParams.values = field_desc.enum_list;
7336
- break;
7379
+ case "list": column.editorParams.values = field_desc.enum_list;
7337
7380
  }
7338
7381
  break;
7339
7382
  case "hook": break;
@@ -7378,18 +7421,12 @@ function template2columns(gobj, columns, template, sub_elements) {
7378
7421
  verticalNavigation: "table",
7379
7422
  elementAttributes: { title: "slide bar to choose option" }
7380
7423
  };
7381
- switch (field_desc.real_type) {
7382
- case "string": break;
7383
- case "integer": break;
7384
- }
7424
+ field_desc.real_type;
7385
7425
  break;
7386
7426
  case "color":
7387
7427
  column.editor = "input";
7388
7428
  column.editorParams = {};
7389
- switch (field_desc.real_type) {
7390
- case "string": break;
7391
- case "integer": break;
7392
- }
7429
+ field_desc.real_type;
7393
7430
  break;
7394
7431
  case "email":
7395
7432
  column.editor = "input";
@@ -7485,9 +7522,7 @@ function get_form_values(gobj, $form) {
7485
7522
  const date = new Date($input.value);
7486
7523
  value = Math.floor(date.getTime() / 1e3);
7487
7524
  break;
7488
- default:
7489
- value = getInputValue($input);
7490
- break;
7525
+ default: value = getInputValue($input);
7491
7526
  }
7492
7527
  break;
7493
7528
  case "textarea":
@@ -7534,9 +7569,7 @@ function get_form_values(gobj, $form) {
7534
7569
  if ($input.tagName !== "INPUT") $input = $input.querySelector("input");
7535
7570
  value = getInputValue($input);
7536
7571
  break;
7537
- default:
7538
- (0, _yuneta_gobj_js.log_error)((0, _yuneta_gobj_js.sprintf)("%s: $form type unknown: '%s'", (0, _yuneta_gobj_js.gobj_short_name)(gobj), tag));
7539
- break;
7572
+ default: (0, _yuneta_gobj_js.log_error)((0, _yuneta_gobj_js.sprintf)("%s: $form type unknown: '%s'", (0, _yuneta_gobj_js.gobj_short_name)(gobj), tag));
7540
7573
  }
7541
7574
  value = form_value_2_treedb_value(gobj, field_desc, value);
7542
7575
  let path;
@@ -7552,14 +7585,16 @@ function get_form_values(gobj, $form) {
7552
7585
  function clear_data(gobj, $form) {
7553
7586
  let pkey = (0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "pkey");
7554
7587
  $form.querySelectorAll("input, select, textarea, .jsoneditor").forEach(($input) => {
7555
- if ($input.name !== pkey) if ($input.classList.contains("jsoneditor")) {
7556
- let jsoneditor = $input.jsoneditor;
7557
- if (jsoneditor) jsoneditor.set({ text: "" });
7558
- } else if ($input.type === "checkbox") $input.checked = false;
7559
- else if ($input.type === "radio") $input.checked = false;
7560
- else if ($input.type === "datetime-local") $input.value = null;
7561
- else if ($input.type === "select-multiple") $input.tom_select.clear();
7562
- else $input.value = null;
7588
+ if ($input.name !== pkey) {
7589
+ if ($input.classList.contains("jsoneditor")) {
7590
+ let jsoneditor = $input.jsoneditor;
7591
+ if (jsoneditor) jsoneditor.set({ text: "" });
7592
+ } else if ($input.type === "checkbox") $input.checked = false;
7593
+ else if ($input.type === "radio") $input.checked = false;
7594
+ else if ($input.type === "datetime-local") $input.value = null;
7595
+ else if ($input.type === "select-multiple") $input.tom_select.clear();
7596
+ else $input.value = null;
7597
+ }
7563
7598
  });
7564
7599
  $form.querySelectorAll(".yui-tabulator-table").forEach(($table) => {
7565
7600
  if ($table.tabulator.initialized) $table.tabulator.clearData();
@@ -7641,9 +7676,7 @@ function set_form_values(gobj, template, $form, record) {
7641
7676
  case "color":
7642
7677
  $input.value = convertColor(value);
7643
7678
  break;
7644
- default:
7645
- $input.value = value;
7646
- break;
7679
+ default: $input.value = value;
7647
7680
  }
7648
7681
  break;
7649
7682
  case "textarea":
@@ -7674,9 +7707,7 @@ function set_form_values(gobj, template, $form, record) {
7674
7707
  if ($input.tagName !== "INPUT") $input = $input.querySelector("input");
7675
7708
  $input.value = value;
7676
7709
  break;
7677
- default:
7678
- (0, _yuneta_gobj_js.log_error)((0, _yuneta_gobj_js.sprintf)("%s: $form type unknown: '%s'", (0, _yuneta_gobj_js.gobj_short_name)(gobj), tag));
7679
- break;
7710
+ default: (0, _yuneta_gobj_js.log_error)((0, _yuneta_gobj_js.sprintf)("%s: $form type unknown: '%s'", (0, _yuneta_gobj_js.gobj_short_name)(gobj), tag));
7680
7711
  }
7681
7712
  refresh_clear($input);
7682
7713
  });
@@ -7790,9 +7821,7 @@ function treedb_value_2_form_value(gobj, field_desc, value) {
7790
7821
  }
7791
7822
  value = `${longitude}, ${latitude}`;
7792
7823
  break;
7793
- default:
7794
- (0, _yuneta_gobj_js.log_error)("treedb_value_2_form_value() type unknown: " + type);
7795
- break;
7824
+ default: (0, _yuneta_gobj_js.log_error)("treedb_value_2_form_value() type unknown: " + type);
7796
7825
  }
7797
7826
  return value;
7798
7827
  }
@@ -7836,9 +7865,7 @@ function form_value_2_treedb_value(gobj, field_desc, value) {
7836
7865
  case "integer":
7837
7866
  if (value && (0, _yuneta_gobj_js.is_date)(value)) value = value.getTime() / 1e3;
7838
7867
  break;
7839
- default:
7840
- (0, _yuneta_gobj_js.log_error)("incompatible type for time: " + real_type);
7841
- break;
7868
+ default: (0, _yuneta_gobj_js.log_error)("incompatible type for time: " + real_type);
7842
7869
  }
7843
7870
  break;
7844
7871
  case "date":
@@ -7899,9 +7926,7 @@ function form_value_2_treedb_value(gobj, field_desc, value) {
7899
7926
  "coordinates": [lnglat[0], lnglat[1]]
7900
7927
  } };
7901
7928
  break;
7902
- default:
7903
- (0, _yuneta_gobj_js.log_error)("form_value_2_treedb_value() type unknown: " + type);
7904
- break;
7929
+ default: (0, _yuneta_gobj_js.log_error)("form_value_2_treedb_value() type unknown: " + type);
7905
7930
  }
7906
7931
  return value;
7907
7932
  }
@@ -7938,7 +7963,8 @@ function ac_load_record(gobj, event, kw, src) {
7938
7963
  function ac_save_record(gobj, event, kw, src) {
7939
7964
  let $form = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container").querySelector("form");
7940
7965
  if (validate_form(gobj, $form)) {
7941
- (0, _yuneta_gobj_js.gobj_publish_event)(gobj, "EV_SAVE_RECORD", get_form_values(gobj, $form));
7966
+ let values = get_form_values(gobj, $form);
7967
+ (0, _yuneta_gobj_js.gobj_publish_event)(gobj, "EV_SAVE_RECORD", values);
7942
7968
  set_changed_stated(gobj, false);
7943
7969
  } else {
7944
7970
  kw.abort_close = true;
@@ -8144,7 +8170,7 @@ function create_gclass$13(gclass_name) {
8144
8170
  null
8145
8171
  ]
8146
8172
  ]]];
8147
- __gclass__$13 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, [
8173
+ const event_types = [
8148
8174
  ["EV_LOAD_RECORD", 0],
8149
8175
  ["EV_SAVE_RECORD", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT],
8150
8176
  ["EV_UNDO_RECORD", 0],
@@ -8160,7 +8186,8 @@ function create_gclass$13(gclass_name) {
8160
8186
  ["EV_SHOW", 0],
8161
8187
  ["EV_HIDE", 0],
8162
8188
  ["EV_TIMEOUT", 0]
8163
- ], states, gmt$13, 0, attrs_table$13, PRIVATE_DATA$13, 0, 0, 0, 0);
8189
+ ];
8190
+ __gclass__$13 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$13, 0, attrs_table$13, PRIVATE_DATA$13, 0, 0, 0, 0);
8164
8191
  if (!__gclass__$13) return -1;
8165
8192
  return 0;
8166
8193
  }
@@ -8759,14 +8786,16 @@ function xtouchStart(gobj, e) {
8759
8786
  function ac_edit_map(gobj, event, kw, src) {
8760
8787
  let priv = gobj.priv;
8761
8788
  const map = priv.xmap;
8762
- if ((0, _yuneta_gobj_js.kw_has_key)(kw, "enable_moving_markers")) if (kw.enable_moving_markers) {
8763
- map.on("mousedown", "unclustered-point", priv.xmouseDown);
8764
- map.on("touchstart", "unclustered-point", priv.xtouchStart);
8765
- map.off("click", "unclustered-point", priv.onClick);
8766
- } else {
8767
- map.off("mousedown", "unclustered-point", priv.xmouseDown);
8768
- map.off("touchstart", "unclustered-point", priv.xtouchStart);
8769
- map.on("click", "unclustered-point", priv.onClick);
8789
+ if ((0, _yuneta_gobj_js.kw_has_key)(kw, "enable_moving_markers")) {
8790
+ if (kw.enable_moving_markers) {
8791
+ map.on("mousedown", "unclustered-point", priv.xmouseDown);
8792
+ map.on("touchstart", "unclustered-point", priv.xtouchStart);
8793
+ map.off("click", "unclustered-point", priv.onClick);
8794
+ } else {
8795
+ map.off("mousedown", "unclustered-point", priv.xmouseDown);
8796
+ map.off("touchstart", "unclustered-point", priv.xtouchStart);
8797
+ map.on("click", "unclustered-point", priv.onClick);
8798
+ }
8770
8799
  }
8771
8800
  return 0;
8772
8801
  }
@@ -9009,14 +9038,15 @@ function build_ui$10(gobj) {
9009
9038
  (0, _yuneta_gobj_js.gobj_write_bool_attr)(gobj, "$container", $container);
9010
9039
  (0, _yuneta_gobj_js.gobj_write_bool_attr)(gobj, "own_container", true);
9011
9040
  }
9012
- let uplot$2 = new uplot.default({
9041
+ let uPlot_options = {
9013
9042
  title: (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "title"),
9014
9043
  width: (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "width"),
9015
9044
  height: (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "height"),
9016
9045
  series: (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "series"),
9017
9046
  axes: (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "axes"),
9018
9047
  scales: (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "scales")
9019
- }, (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "data"), $container);
9048
+ };
9049
+ let uplot$2 = new uplot.default(uPlot_options, (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "data"), $container);
9020
9050
  (0, _yuneta_gobj_js.gobj_write_attr)(gobj, "uplot", uplot$2);
9021
9051
  let fixed_height = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "height");
9022
9052
  function fit_to_container() {
@@ -9071,11 +9101,13 @@ function ac_load_data$2(gobj, event, kw, src) {
9071
9101
  for (let idx = 1; idx < uplot$3.series.length; idx++) {
9072
9102
  let serie = uplot$3.series[idx];
9073
9103
  let value = kw[i][serie.id];
9074
- if ((0, _yuneta_gobj_js.is_string)(value)) if (value.toLowerCase() === "on") value = 1;
9075
- else if (value.toLowerCase() === "off") value = 0;
9076
- else {
9077
- (0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)} value not contemplated: '${value}'`);
9078
- value = 0;
9104
+ if ((0, _yuneta_gobj_js.is_string)(value)) {
9105
+ if (value.toLowerCase() === "on") value = 1;
9106
+ else if (value.toLowerCase() === "off") value = 0;
9107
+ else {
9108
+ (0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)} value not contemplated: '${value}'`);
9109
+ value = 0;
9110
+ }
9079
9111
  }
9080
9112
  data[idx].push(value);
9081
9113
  }
@@ -9551,6 +9583,7 @@ function mt_destroy$10(gobj) {
9551
9583
  ************************************************************/
9552
9584
  function build_ui$9(gobj) {
9553
9585
  let priv = gobj.priv;
9586
+ let $toolbar = make_toolbar$3(gobj);
9554
9587
  let $container = (0, _yuneta_gobj_js.createElement2)([
9555
9588
  "div",
9556
9589
  {
@@ -9560,7 +9593,7 @@ function build_ui$9(gobj) {
9560
9593
  [[
9561
9594
  "div",
9562
9595
  { class: "is-flex-grow-0 is-flex toolbar_yui_json_graph" },
9563
- make_toolbar$3(gobj)
9596
+ $toolbar
9564
9597
  ], [
9565
9598
  "div",
9566
9599
  {
@@ -9743,9 +9776,7 @@ function build_cell_html(key, value, type, dark) {
9743
9776
  case "dict":
9744
9777
  display_value = `{${(0, _yuneta_gobj_js.json_object_size)(value)}}`;
9745
9778
  break;
9746
- default:
9747
- display_value = String(value);
9748
- break;
9779
+ default: display_value = String(value);
9749
9780
  }
9750
9781
  return `<span style="color:${key_color}">• ${(0, _yuneta_gobj_js.escapeHtml)(String(key))}: </span><span style="color:${color}">${display_value}</span>`;
9751
9782
  }
@@ -10190,7 +10221,7 @@ function create_gclass$10(gclass_name) {
10190
10221
  null
10191
10222
  ]
10192
10223
  ]]];
10193
- __gclass__$10 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, [
10224
+ const event_types = [
10194
10225
  ["EV_LOAD_DATA", 0],
10195
10226
  ["EV_REFRESH", 0],
10196
10227
  ["EV_THEME", 0],
@@ -10203,7 +10234,8 @@ function create_gclass$10(gclass_name) {
10203
10234
  ["EV_SHOW", 0],
10204
10235
  ["EV_HIDE", 0],
10205
10236
  ["EV_JSON_ITEM_CLICKED", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT]
10206
- ], states, gmt$10, 0, attrs_table$10, PRIVATE_DATA$10, 0, 0, 0, 0);
10237
+ ];
10238
+ __gclass__$10 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$10, 0, attrs_table$10, PRIVATE_DATA$10, 0, 0, 0, 0);
10207
10239
  if (!__gclass__$10) return -1;
10208
10240
  return 0;
10209
10241
  }
@@ -10453,6 +10485,7 @@ function mt_destroy$9(gobj) {
10453
10485
  ************************************************************/
10454
10486
  function build_ui$8(gobj) {
10455
10487
  let priv = gobj.priv;
10488
+ let $toolbar = make_toolbar$2(gobj);
10456
10489
  let $container = (0, _yuneta_gobj_js.createElement2)([
10457
10490
  "div",
10458
10491
  {
@@ -10462,7 +10495,7 @@ function build_ui$8(gobj) {
10462
10495
  [[
10463
10496
  "div",
10464
10497
  { class: "JSON_TOOLBAR is-flex-grow-0" },
10465
- [make_toolbar$2(gobj)]
10498
+ [$toolbar]
10466
10499
  ], [
10467
10500
  "div",
10468
10501
  {
@@ -10819,9 +10852,7 @@ function leaf_row(key, value, depth) {
10819
10852
  case "boolean":
10820
10853
  text = value ? "true" : "false";
10821
10854
  break;
10822
- default:
10823
- text = String(value);
10824
- break;
10855
+ default: text = String(value);
10825
10856
  }
10826
10857
  let body = [];
10827
10858
  if (key !== null && key !== "") {
@@ -11169,7 +11200,7 @@ function create_gclass$9(gclass_name) {
11169
11200
  null
11170
11201
  ]
11171
11202
  ]]];
11172
- __gclass__$9 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, [
11203
+ const event_types = [
11173
11204
  ["EV_SET_JSON", 0],
11174
11205
  ["EV_SUBTREE_LOADED", 0],
11175
11206
  ["EV_SUBTREE_ERROR", 0],
@@ -11184,7 +11215,8 @@ function create_gclass$9(gclass_name) {
11184
11215
  ["EV_SHOW", 0],
11185
11216
  ["EV_HIDE", 0],
11186
11217
  ["EV_EXPAND_PATH", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS]
11187
- ], states, gmt$9, 0, attrs_table$9, PRIVATE_DATA$9, 0, 0, 0, 0);
11218
+ ];
11219
+ __gclass__$9 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$9, 0, attrs_table$9, PRIVATE_DATA$9, 0, 0, 0, 0);
11188
11220
  if (!__gclass__$9) return -1;
11189
11221
  return 0;
11190
11222
  }
@@ -11192,6 +11224,7 @@ function create_gclass$9(gclass_name) {
11192
11224
  * Register GClass
11193
11225
  ***************************************************************/
11194
11226
  function register_c_yui_json() {
11227
+ if ((0, _yuneta_gobj_js.gclass_find_by_name)(GCLASS_NAME$9, false)) return 0;
11195
11228
  return create_gclass$9(GCLASS_NAME$9);
11196
11229
  }
11197
11230
  //#endregion
@@ -11482,6 +11515,7 @@ function mt_destroy$8(gobj) {
11482
11515
  ************************************************************/
11483
11516
  function build_ui$7(gobj) {
11484
11517
  let priv = gobj.priv;
11518
+ let $toolbar = make_toolbar$1(gobj);
11485
11519
  let $container = (0, _yuneta_gobj_js.createElement2)([
11486
11520
  "div",
11487
11521
  {
@@ -11491,7 +11525,7 @@ function build_ui$7(gobj) {
11491
11525
  [[
11492
11526
  "div",
11493
11527
  { class: "is-flex-grow-0 is-flex toolbar_yui_gobj_tree" },
11494
- make_toolbar$1(gobj)
11528
+ $toolbar
11495
11529
  ], [
11496
11530
  "div",
11497
11531
  {
@@ -13460,7 +13494,8 @@ function render_tabs(gobj, items) {
13460
13494
  ]);
13461
13495
  }
13462
13496
  function render_cards(gobj, items) {
13463
- return (0, _yuneta_gobj_js.createElement2)(cards_grid_descriptor(items, (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "show_label")));
13497
+ let show_label = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "show_label");
13498
+ return (0, _yuneta_gobj_js.createElement2)(cards_grid_descriptor(items, show_label));
13464
13499
  }
13465
13500
  /************************************************************
13466
13501
  * "backbar": a single "← <section>" link back to the section
@@ -13927,13 +13962,14 @@ function create_gclass$6(gclass_name) {
13927
13962
  ac_set_items,
13928
13963
  null
13929
13964
  ]]]];
13930
- __gclass__$6 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, [
13965
+ const event_types = [
13931
13966
  ["EV_ROUTE_CHANGED", 0],
13932
13967
  ["EV_SET_ITEMS", 0],
13933
13968
  ["EV_NAV_CLICKED", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_PUBLIC_EVENT],
13934
13969
  ["EV_NAV_ITEM_CLOSE", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_PUBLIC_EVENT],
13935
13970
  ["EV_DRAWER_CLOSE_REQUESTED", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_PUBLIC_EVENT]
13936
- ], states, gmt$6, 0, attrs_table$6, PRIVATE_DATA$6, 0, 0, 0, 0);
13971
+ ];
13972
+ __gclass__$6 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$6, 0, attrs_table$6, PRIVATE_DATA$6, 0, 0, 0, 0);
13937
13973
  if (!__gclass__$6) return -1;
13938
13974
  return 0;
13939
13975
  }
@@ -14099,20 +14135,21 @@ function build_body(shell, t) {
14099
14135
  kind: "group",
14100
14136
  children: map.other
14101
14137
  });
14138
+ let root = {
14139
+ label: map.brand.label || "app",
14140
+ icon: "",
14141
+ route: map.brand.route || "",
14142
+ event: "",
14143
+ current: !!map.brand.current,
14144
+ children
14145
+ };
14102
14146
  let $tree = (0, _yuneta_gobj_js.createElement2)([
14103
14147
  "div",
14104
14148
  { class: "ROUTEMAP_TREE" },
14105
14149
  [(0, _yuneta_gobj_js.createElement2)([
14106
14150
  "ul",
14107
14151
  { class: "ROUTEMAP_UL ROUTEMAP_ROOT" },
14108
- [render_node({
14109
- label: map.brand.label || "app",
14110
- icon: "",
14111
- route: map.brand.route || "",
14112
- event: "",
14113
- current: !!map.brand.current,
14114
- children
14115
- })]
14152
+ [render_node(root)]
14116
14153
  ])]
14117
14154
  ]);
14118
14155
  let $search = (0, _yuneta_gobj_js.createElement2)(["input", {
@@ -14715,7 +14752,8 @@ function add_tab(gobj, gobj2, id, text, icon) {
14715
14752
  ************************************************************/
14716
14753
  function select_topic_by_id(gobj, id) {
14717
14754
  (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_SHOW", { href: id }, gobj);
14718
- (0, _yuneta_gobj_js.gobj_publish_event)(gobj, "EV_TOPIC_SELECTED", { topic: id.indexOf("?") >= 0 ? id.split("?")[1] : id });
14755
+ let topic = id.indexOf("?") >= 0 ? id.split("?")[1] : id;
14756
+ (0, _yuneta_gobj_js.gobj_publish_event)(gobj, "EV_TOPIC_SELECTED", { topic });
14719
14757
  }
14720
14758
  /************************************************************
14721
14759
  * One icon-action anchor of a topic card: a REAL hash link
@@ -15163,13 +15201,14 @@ function process_treedb_descs$1(gobj) {
15163
15201
  (0, _yuneta_gobj_js.gobj_start)(gobj_topic_form);
15164
15202
  }
15165
15203
  let href = (0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "last_selection");
15166
- if ((0, _yuneta_gobj_js.gobj_read_bool_attr)(gobj, "with_cards_landing")) if (gobj.priv._pending_info) {
15167
- let ti = gobj.priv._pending_info;
15168
- gobj.priv._pending_info = null;
15169
- show_topic_info(gobj, ti);
15170
- } else if (href && href.indexOf("?") >= 0) (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_SHOW", { href }, gobj);
15171
- else show_topics_landing(gobj);
15172
- else {
15204
+ if ((0, _yuneta_gobj_js.gobj_read_bool_attr)(gobj, "with_cards_landing")) {
15205
+ if (gobj.priv._pending_info) {
15206
+ let ti = gobj.priv._pending_info;
15207
+ gobj.priv._pending_info = null;
15208
+ show_topic_info(gobj, ti);
15209
+ } else if (href && href.indexOf("?") >= 0) (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_SHOW", { href }, gobj);
15210
+ else show_topics_landing(gobj);
15211
+ } else {
15173
15212
  if (!href) try {
15174
15213
  let topic = window.localStorage.getItem(`yui_treedb_topics:${(0, _yuneta_gobj_js.gobj_name)(gobj)}`);
15175
15214
  if (topic) href = `${(0, _yuneta_gobj_js.gobj_name)(gobj)}?${topic}`;
@@ -15511,7 +15550,10 @@ function ac_mt_command_answer$1(gobj, event, kw, src) {
15511
15550
  break;
15512
15551
  case "nodes":
15513
15552
  let topic_name = (0, _yuneta_gobj_js.kw_get_str)(gobj, kw_command, "topic_name", "", _yuneta_gobj_js.kw_flag_t.KW_REQUIRED);
15514
- if (result >= 0) (0, _yuneta_gobj_js.gobj_send_event)((0, _yuneta_gobj_js.gobj_find_child)(gobj, { __gobj_name__: `${(0, _yuneta_gobj_js.gobj_name)(gobj)}?${topic_name}` }), "EV_LOAD_NODES", data, gobj);
15553
+ if (result >= 0) {
15554
+ let gobj_topic_form = (0, _yuneta_gobj_js.gobj_find_child)(gobj, { __gobj_name__: `${(0, _yuneta_gobj_js.gobj_name)(gobj)}?${topic_name}` });
15555
+ (0, _yuneta_gobj_js.gobj_send_event)(gobj_topic_form, "EV_LOAD_NODES", data, gobj);
15556
+ }
15515
15557
  break;
15516
15558
  case "create-node":
15517
15559
  case "update-node":
@@ -15677,7 +15719,10 @@ function ac_treedb_node_created$1(gobj, event, kw, src) {
15677
15719
  let treedb_name = (0, _yuneta_gobj_js.kw_get_str)(gobj, kw, "treedb_name", "", 0);
15678
15720
  let topic_name = (0, _yuneta_gobj_js.kw_get_str)(gobj, kw, "topic_name", "", 0);
15679
15721
  let node = (0, _yuneta_gobj_js.kw_get_dict_value)(gobj, kw, "node", null, 0);
15680
- if (treedb_name === (0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "treedb_name")) (0, _yuneta_gobj_js.gobj_send_event)(get_gobj_formtable(gobj, topic_name), "EV_LOAD_NODE_CREATED", [node], gobj);
15722
+ if (treedb_name === (0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "treedb_name")) {
15723
+ let gobj_formtable = get_gobj_formtable(gobj, topic_name);
15724
+ (0, _yuneta_gobj_js.gobj_send_event)(gobj_formtable, "EV_LOAD_NODE_CREATED", [node], gobj);
15725
+ }
15681
15726
  return 0;
15682
15727
  }
15683
15728
  /********************************************
@@ -15687,7 +15732,10 @@ function ac_treedb_node_updated$1(gobj, event, kw, src) {
15687
15732
  let treedb_name = (0, _yuneta_gobj_js.kw_get_str)(gobj, kw, "treedb_name", "", 0);
15688
15733
  let topic_name = (0, _yuneta_gobj_js.kw_get_str)(gobj, kw, "topic_name", "", 0);
15689
15734
  let node = (0, _yuneta_gobj_js.kw_get_dict_value)(gobj, kw, "node", null, 0);
15690
- if (treedb_name === (0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "treedb_name")) (0, _yuneta_gobj_js.gobj_send_event)(get_gobj_formtable(gobj, topic_name), "EV_LOAD_NODE_UPDATED", [node], gobj);
15735
+ if (treedb_name === (0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "treedb_name")) {
15736
+ let gobj_formtable = get_gobj_formtable(gobj, topic_name);
15737
+ (0, _yuneta_gobj_js.gobj_send_event)(gobj_formtable, "EV_LOAD_NODE_UPDATED", [node], gobj);
15738
+ }
15691
15739
  return 0;
15692
15740
  }
15693
15741
  /********************************************
@@ -15697,7 +15745,10 @@ function ac_treedb_node_deleted$1(gobj, event, kw, src) {
15697
15745
  let treedb_name = (0, _yuneta_gobj_js.kw_get_str)(gobj, kw, "treedb_name", "", 0);
15698
15746
  let topic_name = (0, _yuneta_gobj_js.kw_get_str)(gobj, kw, "topic_name", "", 0);
15699
15747
  let node = (0, _yuneta_gobj_js.kw_get_dict_value)(gobj, kw, "node", null, 0);
15700
- if (treedb_name === (0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "treedb_name")) (0, _yuneta_gobj_js.gobj_send_event)(get_gobj_formtable(gobj, topic_name), "EV_NODE_DELETED", [node], gobj);
15748
+ if (treedb_name === (0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "treedb_name")) {
15749
+ let gobj_formtable = get_gobj_formtable(gobj, topic_name);
15750
+ (0, _yuneta_gobj_js.gobj_send_event)(gobj_formtable, "EV_NODE_DELETED", [node], gobj);
15751
+ }
15701
15752
  return 0;
15702
15753
  }
15703
15754
  /********************************************
@@ -15903,7 +15954,7 @@ function create_gclass$5(gclass_name) {
15903
15954
  null
15904
15955
  ]
15905
15956
  ]]];
15906
- __gclass__$5 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, [
15957
+ const event_types = [
15907
15958
  ["EV_MT_COMMAND_ANSWER", _yuneta_gobj_js.event_flag_t.EVF_PUBLIC_EVENT],
15908
15959
  ["EV_TREEDB_NODE_CREATED", _yuneta_gobj_js.event_flag_t.EVF_PUBLIC_EVENT],
15909
15960
  ["EV_TREEDB_NODE_UPDATED", _yuneta_gobj_js.event_flag_t.EVF_PUBLIC_EVENT],
@@ -15924,7 +15975,8 @@ function create_gclass$5(gclass_name) {
15924
15975
  ["EV_BACK_TO_TOPICS", 0],
15925
15976
  ["EV_TRANSPORT_STATE", 0],
15926
15977
  ["EV_TOPIC_SELECTED", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS]
15927
- ], states, gmt$5, 0, attrs_table$5, PRIVATE_DATA$5, 0, 0, 0, 0);
15978
+ ];
15979
+ __gclass__$5 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$5, 0, attrs_table$5, PRIVATE_DATA$5, 0, 0, 0, 0);
15928
15980
  if (!__gclass__$5) return -1;
15929
15981
  return 0;
15930
15982
  }
@@ -16054,6 +16106,7 @@ var attrs_table$4 = [
16054
16106
  (0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_BOOLEAN, "with_paste_button", 0, true, "Button toolbar PASTE"),
16055
16107
  (0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_BOOLEAN, "with_refresh_button", 0, true, "Button toolbar REFRESH"),
16056
16108
  (0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_BOOLEAN, "with_search_button", 0, true, "Button toolbar SEARCH"),
16109
+ (0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_BOOLEAN, "with_schema_button", 0, true, "Button toolbar SCHEMA (show the topic's desc)"),
16057
16110
  (0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_BOOLEAN, "with_in_row_edit_icons", 0, true, "Add a last column with internal EDIT/DELETE icon"),
16058
16111
  (0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_BOOLEAN, "editable", 0, false, "Edit state"),
16059
16112
  (0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_BOOLEAN, "with_checkbox", 0, true, "Auxiliary first column to select rows"),
@@ -16087,7 +16140,9 @@ var PRIVATE_DATA$4 = {
16087
16140
  topic_name: "",
16088
16141
  tabulator: null,
16089
16142
  form: null,
16090
- form_modal: null
16143
+ form_modal: null,
16144
+ schema_gobj: null,
16145
+ schema_modal: null
16091
16146
  };
16092
16147
  var __gclass__$4 = null;
16093
16148
  function popup_mount_layer(gobj) {
@@ -16126,6 +16181,7 @@ function mt_stop$4(gobj) {
16126
16181
  let shell = yui_shell_of(gobj);
16127
16182
  if (shell) (0, _yuneta_gobj_js.gobj_unsubscribe_event)(shell, "EV_LANGUAGE_CHANGED", {}, gobj);
16128
16183
  close_form_dialog(gobj);
16184
+ close_schema_dialog(gobj);
16129
16185
  table__destroy(gobj);
16130
16186
  }
16131
16187
  /***************************************************************
@@ -16133,6 +16189,7 @@ function mt_stop$4(gobj) {
16133
16189
  ***************************************************************/
16134
16190
  function mt_destroy$4(gobj) {
16135
16191
  close_form_dialog(gobj);
16192
+ close_schema_dialog(gobj);
16136
16193
  destroy_ui$1(gobj);
16137
16194
  }
16138
16195
  /************************************************************
@@ -16188,7 +16245,8 @@ function cmd_get_topic_data(gobj, cmd, kw, src) {
16188
16245
  async function readClipboard(gobj) {
16189
16246
  try {
16190
16247
  const text = await navigator.clipboard.readText();
16191
- (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_PASTE_ROWS", JSON.parse(text), gobj);
16248
+ let kw = JSON.parse(text);
16249
+ (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_PASTE_ROWS", kw, gobj);
16192
16250
  } catch (error) {
16193
16251
  (0, _yuneta_gobj_js.log_error)(`Failed to read clipboard contents: ${error}`);
16194
16252
  }
@@ -16334,7 +16392,9 @@ function build_ui$4(gobj) {
16334
16392
  let toolbar_id = (0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "toolbar_id");
16335
16393
  let $view_toolbar = (0, _yuneta_gobj_js.createElement2)(["div", { class: "TREEDB_TABLE_TOOLS is-flex is-align-items-center" }]);
16336
16394
  let with_refresh_button = (0, _yuneta_gobj_js.gobj_read_bool_attr)(gobj, "with_refresh_button");
16337
- if ((0, _yuneta_gobj_js.gobj_read_bool_attr)(gobj, "with_search_button")) {
16395
+ let with_search_button = (0, _yuneta_gobj_js.gobj_read_bool_attr)(gobj, "with_search_button");
16396
+ let with_schema_button = (0, _yuneta_gobj_js.gobj_read_bool_attr)(gobj, "with_schema_button");
16397
+ if (with_search_button) {
16338
16398
  let search_id = `${toolbar_id}_search`;
16339
16399
  let $search_box = (0, _yuneta_gobj_js.createElement2)([
16340
16400
  "div",
@@ -16392,6 +16452,33 @@ function build_ui$4(gobj) {
16392
16452
  ]);
16393
16453
  $view_toolbar.appendChild($refresh);
16394
16454
  }
16455
+ if (with_schema_button) {
16456
+ let $schema = (0, _yuneta_gobj_js.createElement2)([
16457
+ "button",
16458
+ {
16459
+ class: "TREEDB_TABLE_SCHEMA button mr-1",
16460
+ title: (0, i18next.t)("schema"),
16461
+ "data-i18n-title": "schema",
16462
+ "aria-label": (0, i18next.t)("schema"),
16463
+ "data-i18n-aria-label": "schema"
16464
+ },
16465
+ [["i", { class: "yi-hexagon-nodes" }], [
16466
+ "span",
16467
+ {
16468
+ class: "is-hidden-mobile",
16469
+ i18n: "schema",
16470
+ style: "padding-left:5px;"
16471
+ },
16472
+ "schema"
16473
+ ]],
16474
+ { "click": (event) => {
16475
+ event.stopPropagation();
16476
+ (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_SHOW_SCHEMA", {}, gobj);
16477
+ } }
16478
+ ]);
16479
+ $view_toolbar.appendChild($schema);
16480
+ }
16481
+ let table_id = (0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "table_id");
16395
16482
  let $container = (0, _yuneta_gobj_js.createElement2)([
16396
16483
  "div",
16397
16484
  {
@@ -16402,7 +16489,7 @@ function build_ui$4(gobj) {
16402
16489
  class: "TREEDB_TABLE_TOOLBAR toolbar_tabulator_table m-1",
16403
16490
  style: "display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap;"
16404
16491
  }], ["div", {
16405
- id: `${(0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "table_id")}`,
16492
+ id: `${table_id}`,
16406
16493
  style: "margin-top:0px !important;"
16407
16494
  }]]
16408
16495
  ]);
@@ -16445,7 +16532,8 @@ function destroy_ui$1(gobj) {
16445
16532
  * columns); leave the rest on the flat shared key.
16446
16533
  ******************************************************************/
16447
16534
  function col_label(col, topic_name) {
16448
- return (0, i18next.t)(topic_name ? [topic_name + "." + col.id, col.id] : [col.id], { defaultValue: col.header || col.id });
16535
+ let keys = topic_name ? [topic_name + "." + col.id, col.id] : [col.id];
16536
+ return (0, i18next.t)(keys, { defaultValue: col.header || col.id });
16449
16537
  }
16450
16538
  /******************************************************************
16451
16539
  * Column-title formatter: render the header as a span carrying
@@ -16571,7 +16659,6 @@ function create_tabulator(gobj) {
16571
16659
  case "real":
16572
16660
  hozAlign = "right";
16573
16661
  sorter = "number";
16574
- break;
16575
16662
  }
16576
16663
  let colDef = {
16577
16664
  title: col_label(col, (0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "topic_name")),
@@ -16716,9 +16803,7 @@ function transform__treedb_value_2_table_value(gobj, col, value, row, field) {
16716
16803
  case "object":
16717
16804
  case "dict":
16718
16805
  case "array":
16719
- case "list":
16720
- value = JSON.stringify(value);
16721
- break;
16806
+ case "list": value = JSON.stringify(value);
16722
16807
  }
16723
16808
  break;
16724
16809
  case "hook":
@@ -16735,14 +16820,16 @@ function transform__treedb_value_2_table_value(gobj, col, value, row, field) {
16735
16820
  break;
16736
16821
  case "fkey":
16737
16822
  let new_value = [];
16738
- if (value) if ((0, _yuneta_gobj_js.is_string)(value)) {
16739
- let fkey = (0, _yuneta_gobj_js.treedb_decoder_fkey)(col, value);
16740
- if (fkey) new_value.push(fkey.id);
16741
- } else if ((0, _yuneta_gobj_js.is_array)(value)) for (let i = 0; i < value.length; i++) {
16742
- let fkey = (0, _yuneta_gobj_js.treedb_decoder_fkey)(col, value[i]);
16743
- if (fkey) new_value.push(fkey.id);
16823
+ if (value) {
16824
+ if ((0, _yuneta_gobj_js.is_string)(value)) {
16825
+ let fkey = (0, _yuneta_gobj_js.treedb_decoder_fkey)(col, value);
16826
+ if (fkey) new_value.push(fkey.id);
16827
+ } else if ((0, _yuneta_gobj_js.is_array)(value)) for (let i = 0; i < value.length; i++) {
16828
+ let fkey = (0, _yuneta_gobj_js.treedb_decoder_fkey)(col, value[i]);
16829
+ if (fkey) new_value.push(fkey.id);
16830
+ }
16831
+ else (0, _yuneta_gobj_js.log_error)("fkey type unsupported: " + JSON.stringify(value));
16744
16832
  }
16745
- else (0, _yuneta_gobj_js.log_error)("fkey type unsupported: " + JSON.stringify(value));
16746
16833
  value = new_value.join(", ");
16747
16834
  break;
16748
16835
  case "now":
@@ -16763,14 +16850,11 @@ function transform__treedb_value_2_table_value(gobj, col, value, row, field) {
16763
16850
  second: "2-digit",
16764
16851
  hour12: true
16765
16852
  }).format(value) + "</span>";
16766
- break;
16767
16853
  }
16768
16854
  break;
16769
16855
  case "color": break;
16770
16856
  case "image": break;
16771
- default:
16772
- (0, _yuneta_gobj_js.log_error)(`transform__treedb_value_2_table_value() unhandled type '${field_desc.type}' (real_type='${field_desc.real_type}') for field '${field}', topic ${priv.topic_name}`);
16773
- break;
16857
+ default: (0, _yuneta_gobj_js.log_error)(`transform__treedb_value_2_table_value() unhandled type '${field_desc.type}' (real_type='${field_desc.real_type}') for field '${field}', topic ${priv.topic_name}`);
16774
16858
  }
16775
16859
  if (value !== null && value !== void 0 && typeof value === "object" && !(value instanceof Node)) {
16776
16860
  (0, _yuneta_gobj_js.log_error)(`transform__treedb_value_2_table_value() unexpected object value for field '${field}' (type='${field_desc.type}', real_type='${field_desc.real_type}'): ${JSON.stringify(value)}, topic ${priv.topic_name}`);
@@ -16938,6 +17022,83 @@ function close_form_dialog(gobj) {
16938
17022
  teardown_form_child(gobj);
16939
17023
  }
16940
17024
  /************************************************************
17025
+ * Show the topic's SCHEMA: its `desc` — pkey, cols, types,
17026
+ * flags and fkey targets — in the standardized adaptive
17027
+ * dialog, rendered by a C_YUI_JSON child. A viewer and not a
17028
+ * <pre> dump because a forty-column topic is only readable
17029
+ * collapsed and searchable.
17030
+ *
17031
+ * Read-only and offline: the desc is already in this gobj,
17032
+ * so no command is issued and nothing can be edited here.
17033
+ ************************************************************/
17034
+ function open_schema_dialog(gobj) {
17035
+ close_schema_dialog(gobj);
17036
+ let priv = gobj.priv;
17037
+ let desc = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "desc");
17038
+ if (!desc) {
17039
+ (0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: no desc, no schema to show`);
17040
+ return;
17041
+ }
17042
+ let shell = yui_shell_of(gobj);
17043
+ if (!shell) {
17044
+ (0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: no shell, cannot open the schema view`);
17045
+ return;
17046
+ }
17047
+ let json_view = (0, _yuneta_gobj_js.gobj_create_pure_child)("schema_" + (0, _yuneta_gobj_js.clean_name)((0, _yuneta_gobj_js.gobj_name)(gobj)), "C_YUI_JSON", {}, gobj);
17048
+ if (!json_view) {
17049
+ (0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: cannot create the schema viewer`);
17050
+ return;
17051
+ }
17052
+ priv.schema_gobj = json_view;
17053
+ (0, _yuneta_gobj_js.gobj_start)(json_view);
17054
+ let $box = (0, _yuneta_gobj_js.gobj_read_attr)(json_view, "$container");
17055
+ if (!$box) {
17056
+ (0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: the schema viewer built no $container`);
17057
+ teardown_schema_child(gobj);
17058
+ return;
17059
+ }
17060
+ priv.schema_modal = yui_shell_show_modal(shell, $box, {
17061
+ dialog: true,
17062
+ logical_class: "TREEDB_SCHEMA_SHEET",
17063
+ title_prefix: (0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "topic_name"),
17064
+ title: "schema",
17065
+ t: i18next.t,
17066
+ on_close: function() {
17067
+ teardown_schema_child(gobj);
17068
+ }
17069
+ });
17070
+ (0, _yuneta_gobj_js.gobj_send_event)(json_view, "EV_SET_JSON", { json: desc }, gobj);
17071
+ }
17072
+ /************************************************************
17073
+ * Destroy the hosted C_YUI_JSON child. Called from the
17074
+ * schema modal's on_close — the shell has already removed
17075
+ * the dialog DOM and retired its Escape / history entries.
17076
+ ************************************************************/
17077
+ function teardown_schema_child(gobj) {
17078
+ let priv = gobj.priv;
17079
+ if (priv.schema_gobj) {
17080
+ if ((0, _yuneta_gobj_js.gobj_is_running)(priv.schema_gobj)) (0, _yuneta_gobj_js.gobj_stop)(priv.schema_gobj);
17081
+ (0, _yuneta_gobj_js.gobj_destroy)(priv.schema_gobj);
17082
+ priv.schema_gobj = null;
17083
+ }
17084
+ priv.schema_modal = null;
17085
+ }
17086
+ /************************************************************
17087
+ * Close the schema dialog (teardown, or a second open).
17088
+ * Closing the modal runs its on_close, which tears the
17089
+ * viewer child down.
17090
+ ************************************************************/
17091
+ function close_schema_dialog(gobj) {
17092
+ let priv = gobj.priv;
17093
+ if (priv.schema_modal) {
17094
+ let modal = priv.schema_modal;
17095
+ priv.schema_modal = null;
17096
+ modal.close();
17097
+ return;
17098
+ }
17099
+ teardown_schema_child(gobj);
17100
+ }
17101
+ /************************************************************
16941
17102
  * True if the topic's pkey col carries the "rowid" flag.
16942
17103
  ************************************************************/
16943
17104
  function pkey_is_rowid(gobj) {
@@ -17051,16 +17212,16 @@ function transform__form_value_2_treedb_value(gobj, col, value, operation) {
17051
17212
  case "enum":
17052
17213
  switch (field_desc.real_type) {
17053
17214
  case "string":
17054
- if ((0, _yuneta_gobj_js.is_array)(value)) if (value.length > 0) value = value[0];
17055
- else value = "";
17215
+ if ((0, _yuneta_gobj_js.is_array)(value)) {
17216
+ if (value.length > 0) value = value[0];
17217
+ else value = "";
17218
+ }
17056
17219
  break;
17057
17220
  case "object":
17058
17221
  case "dict":
17059
17222
  case "array":
17060
17223
  case "list": break;
17061
- default:
17062
- (0, _yuneta_gobj_js.log_error)("col type unknown 6: " + field_desc.real_type);
17063
- break;
17224
+ default: (0, _yuneta_gobj_js.log_error)("col type unknown 6: " + field_desc.real_type);
17064
17225
  }
17065
17226
  break;
17066
17227
  case "now":
@@ -17072,23 +17233,17 @@ function transform__form_value_2_treedb_value(gobj, col, value, operation) {
17072
17233
  case "integer":
17073
17234
  if (value && (0, _yuneta_gobj_js.is_date)(value)) value = value.getTime() / 1e3;
17074
17235
  break;
17075
- default:
17076
- (0, _yuneta_gobj_js.log_error)("col type unknown 7: " + field_desc.real_type);
17077
- break;
17236
+ default: (0, _yuneta_gobj_js.log_error)("col type unknown 7: " + field_desc.real_type);
17078
17237
  }
17079
17238
  break;
17080
17239
  case "color":
17081
17240
  switch (field_desc.real_type) {
17082
17241
  case "string": break;
17083
17242
  case "integer": break;
17084
- default:
17085
- (0, _yuneta_gobj_js.log_error)("col type unknown 7: " + field_desc.real_type);
17086
- break;
17243
+ default: (0, _yuneta_gobj_js.log_error)("col type unknown 7: " + field_desc.real_type);
17087
17244
  }
17088
17245
  break;
17089
- default:
17090
- (0, _yuneta_gobj_js.log_error)("col type unknown 8: " + field_desc.type);
17091
- break;
17246
+ default: (0, _yuneta_gobj_js.log_error)("col type unknown 8: " + field_desc.type);
17092
17247
  }
17093
17248
  return value;
17094
17249
  }
@@ -17130,9 +17285,7 @@ function build_fkey_ref(gobj, col, value) {
17130
17285
  refs[topic_name + "^" + v + "^" + hook] = true;
17131
17286
  break;
17132
17287
  case "array":
17133
- case "list":
17134
- refs.push(topic_name + "^" + v + "^" + hook);
17135
- break;
17288
+ case "list": refs.push(topic_name + "^" + v + "^" + hook);
17136
17289
  }
17137
17290
  } else if ((0, _yuneta_gobj_js.is_object)(v)) {
17138
17291
  let topic_name = v.topic_name;
@@ -17145,9 +17298,7 @@ function build_fkey_ref(gobj, col, value) {
17145
17298
  refs[topic_name + "^" + v.id + "^" + hook] = true;
17146
17299
  break;
17147
17300
  case "array":
17148
- case "list":
17149
- refs.push(topic_name + "^" + v.id + "^" + hook);
17150
- break;
17301
+ case "list": refs.push(topic_name + "^" + v.id + "^" + hook);
17151
17302
  }
17152
17303
  } else {
17153
17304
  (0, _yuneta_gobj_js.log_error)("Merde value1: " + v);
@@ -17264,8 +17415,10 @@ function ac_load_nodes(gobj, event, kw, src) {
17264
17415
  return -1;
17265
17416
  }
17266
17417
  let tabulator = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "tabulator");
17267
- if (tabulator) if (tabulator._ready) tabulator.setData(data);
17268
- else tabulator._pendingData = data;
17418
+ if (tabulator) {
17419
+ if (tabulator._ready) tabulator.setData(data);
17420
+ else tabulator._pendingData = data;
17421
+ }
17269
17422
  return 0;
17270
17423
  }
17271
17424
  /************************************************************
@@ -17374,9 +17527,7 @@ function ac_new_row(gobj, event, kw, src) {
17374
17527
  case "template":
17375
17528
  if (col.template) row[col.id] = col.template;
17376
17529
  break;
17377
- default:
17378
- if (field_desc.default_value !== void 0) row[col.id] = field_desc.default_value;
17379
- break;
17530
+ default: if (field_desc.default_value !== void 0) row[col.id] = field_desc.default_value;
17380
17531
  }
17381
17532
  }
17382
17533
  show_create_form(gobj, row);
@@ -17467,7 +17618,8 @@ function ac_paste_rows(gobj, event, kw, src) {
17467
17618
  * fkeys, times and numbers). Route by the form's mode.
17468
17619
  ************************************************************/
17469
17620
  function ac_form_save_record(gobj, event, kw, src) {
17470
- (0, _yuneta_gobj_js.gobj_publish_event)(gobj, (0, _yuneta_gobj_js.gobj_read_str_attr)(src, "form_mode") === "create" ? "EV_CREATE_RECORD" : "EV_UPDATE_RECORD", {
17621
+ let mode = (0, _yuneta_gobj_js.gobj_read_str_attr)(src, "form_mode");
17622
+ (0, _yuneta_gobj_js.gobj_publish_event)(gobj, mode === "create" ? "EV_CREATE_RECORD" : "EV_UPDATE_RECORD", {
17471
17623
  topic_name: (0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "topic_name"),
17472
17624
  record: kw
17473
17625
  });
@@ -17484,12 +17636,14 @@ function ac_select_rows(gobj, event, kw, src) {
17484
17636
  let $container = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container");
17485
17637
  let $button_delete_record = $container.querySelector(`.button-delete-record`);
17486
17638
  let $button_copy_record = $container.querySelector(`.button-copy-record`);
17487
- if ($button_delete_record) if (tabulator.getSelectedData().length && (0, _yuneta_gobj_js.gobj_read_bool_attr)(gobj, "editable")) {
17488
- $button_delete_record.removeAttribute("disabled");
17489
- $button_copy_record.removeAttribute("disabled");
17490
- } else {
17491
- $button_delete_record.setAttribute("disabled", true);
17492
- $button_copy_record.setAttribute("disabled", true);
17639
+ if ($button_delete_record) {
17640
+ if (tabulator.getSelectedData().length && (0, _yuneta_gobj_js.gobj_read_bool_attr)(gobj, "editable")) {
17641
+ $button_delete_record.removeAttribute("disabled");
17642
+ $button_copy_record.removeAttribute("disabled");
17643
+ } else {
17644
+ $button_delete_record.setAttribute("disabled", true);
17645
+ $button_copy_record.setAttribute("disabled", true);
17646
+ }
17493
17647
  }
17494
17648
  if ((0, _yuneta_gobj_js.gobj_read_bool_attr)(gobj, "broadcast_select_rows_event")) (0, _yuneta_gobj_js.gobj_publish_event)(gobj, event, kw);
17495
17649
  return 0;
@@ -17502,12 +17656,14 @@ function ac_unselect_rows(gobj, event, kw, src) {
17502
17656
  let $container = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container");
17503
17657
  let $button_delete_record = $container.querySelector(`.button-delete-record`);
17504
17658
  let $button_copy_record = $container.querySelector(`.button-copy-record`);
17505
- if ($button_delete_record) if (tabulator.getSelectedData().length && (0, _yuneta_gobj_js.gobj_read_bool_attr)(gobj, "editable")) {
17506
- $button_delete_record.removeAttribute("disabled");
17507
- $button_copy_record.removeAttribute("disabled");
17508
- } else {
17509
- $button_delete_record.setAttribute("disabled", true);
17510
- $button_copy_record.setAttribute("disabled", true);
17659
+ if ($button_delete_record) {
17660
+ if (tabulator.getSelectedData().length && (0, _yuneta_gobj_js.gobj_read_bool_attr)(gobj, "editable")) {
17661
+ $button_delete_record.removeAttribute("disabled");
17662
+ $button_copy_record.removeAttribute("disabled");
17663
+ } else {
17664
+ $button_delete_record.setAttribute("disabled", true);
17665
+ $button_copy_record.setAttribute("disabled", true);
17666
+ }
17511
17667
  }
17512
17668
  if ((0, _yuneta_gobj_js.gobj_read_bool_attr)(gobj, "broadcast_select_rows_event")) (0, _yuneta_gobj_js.gobj_publish_event)(gobj, event, kw);
17513
17669
  return 0;
@@ -17529,7 +17685,8 @@ function ac_change_locale(gobj, event, kw, src) {
17529
17685
  * };
17530
17686
  ************************************************************/
17531
17687
  function ac_show_hook_data$1(gobj, event, kw, src) {
17532
- let row = (0, _yuneta_gobj_js.kwid_find_one_record)(gobj, (0, _yuneta_gobj_js.gobj_command)((0, _yuneta_gobj_js.gobj_parent)(gobj), "get_topic_data", kw, gobj).data, kw.row_id, null);
17688
+ let webix = (0, _yuneta_gobj_js.gobj_command)((0, _yuneta_gobj_js.gobj_parent)(gobj), "get_topic_data", kw, gobj);
17689
+ let row = (0, _yuneta_gobj_js.kwid_find_one_record)(gobj, webix.data, kw.row_id, null);
17533
17690
  if (row) {
17534
17691
  let cell = row[kw.col_id];
17535
17692
  show_dropdown_popup_menu(gobj, kw.click_x, kw.click_y, cell);
@@ -17544,6 +17701,13 @@ function ac_refresh$1(gobj, event, kw, src) {
17544
17701
  return 0;
17545
17702
  }
17546
17703
  /************************************************************
17704
+ * Show the schema (desc) of this topic
17705
+ ************************************************************/
17706
+ function ac_show_schema(gobj, event, kw, src) {
17707
+ open_schema_dialog(gobj);
17708
+ return 0;
17709
+ }
17710
+ /************************************************************
17547
17711
  * {
17548
17712
  * href: href
17549
17713
  * }
@@ -17657,6 +17821,11 @@ function create_gclass$4(gclass_name) {
17657
17821
  ac_refresh$1,
17658
17822
  null
17659
17823
  ],
17824
+ [
17825
+ "EV_SHOW_SCHEMA",
17826
+ ac_show_schema,
17827
+ null
17828
+ ],
17660
17829
  [
17661
17830
  "EV_SHOW",
17662
17831
  ac_show$3,
@@ -17668,7 +17837,7 @@ function create_gclass$4(gclass_name) {
17668
17837
  null
17669
17838
  ]
17670
17839
  ]]];
17671
- __gclass__$4 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, [
17840
+ const event_types = [
17672
17841
  ["EV_LANGUAGE_CHANGED", 0],
17673
17842
  ["EV_LOAD_NODES", 0],
17674
17843
  ["EV_LOAD_NODE_CREATED", 0],
@@ -17685,13 +17854,15 @@ function create_gclass$4(gclass_name) {
17685
17854
  ["EV_SHOW_HOOK_DATA", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT],
17686
17855
  ["EV_CHANGE_LOCALE", 0],
17687
17856
  ["EV_REFRESH", 0],
17857
+ ["EV_SHOW_SCHEMA", 0],
17688
17858
  ["EV_CREATE_RECORD", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT],
17689
17859
  ["EV_UPDATE_RECORD", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT],
17690
17860
  ["EV_DELETE_RECORD", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT],
17691
17861
  ["EV_REFRESH_TOPIC", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT],
17692
17862
  ["EV_SHOW", 0],
17693
17863
  ["EV_HIDE", 0]
17694
- ], states, gmt$4, 0, attrs_table$4, PRIVATE_DATA$4, 0, 0, 0, 0);
17864
+ ];
17865
+ __gclass__$4 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$4, 0, attrs_table$4, PRIVATE_DATA$4, 0, 0, 0, 0);
17695
17866
  if (!__gclass__$4) return -1;
17696
17867
  return 0;
17697
17868
  }
@@ -17700,6 +17871,7 @@ function create_gclass$4(gclass_name) {
17700
17871
  ***************************************************************/
17701
17872
  function register_c_yui_treedb_topic_with_form() {
17702
17873
  if (!(0, _yuneta_gobj_js.gclass_find_by_name)("C_YUI_FORM", false)) register_c_yui_form();
17874
+ if (!(0, _yuneta_gobj_js.gclass_find_by_name)("C_YUI_JSON", false)) register_c_yui_json();
17703
17875
  return create_gclass$4(GCLASS_NAME$4);
17704
17876
  }
17705
17877
  //#endregion
@@ -17894,7 +18066,8 @@ function mt_create$3(gobj) {
17894
18066
  if (!subscriber) subscriber = (0, _yuneta_gobj_js.gobj_parent)(gobj);
17895
18067
  (0, _yuneta_gobj_js.gobj_subscribe_event)(gobj, null, {}, subscriber);
17896
18068
  if (!priv.treedb_name) (0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_name)(gobj)} -> treedb_name not configured`);
17897
- (0, _yuneta_gobj_js.gobj_write_attr)(gobj, "canvas_id", (0, _yuneta_gobj_js.clean_name)((0, _yuneta_gobj_js.gobj_name)(gobj)) + "-canvas");
18069
+ let canvas_id = (0, _yuneta_gobj_js.clean_name)((0, _yuneta_gobj_js.gobj_name)(gobj)) + "-canvas";
18070
+ (0, _yuneta_gobj_js.gobj_write_attr)(gobj, "canvas_id", canvas_id);
17898
18071
  let $container_canvas = build_ui$3(gobj).querySelector(`#${priv.canvas_id}`);
17899
18072
  priv.gobj_nodes_tree = (0, _yuneta_gobj_js.gobj_create_service)(`${(0, _yuneta_gobj_js.gobj_name)(gobj)}-g6`, "C_G6_NODES_TREE", {
17900
18073
  $container: $container_canvas,
@@ -18680,8 +18853,10 @@ function ac_mt_command_answer(gobj, event, kw, src) {
18680
18853
  else (0, _yuneta_gobj_js.gobj_send_event)(jv, "EV_SET_JSON", { json: data }, gobj);
18681
18854
  return 0;
18682
18855
  }
18683
- if (result < 0) if (command === "descs") show_load_error(gobj, (0, i18next.t)(comment));
18684
- else yui_shell_show_error(yui_shell_of(gobj), comment, { t: i18next.t });
18856
+ if (result < 0) {
18857
+ if (command === "descs") show_load_error(gobj, (0, i18next.t)(comment));
18858
+ else yui_shell_show_error(yui_shell_of(gobj), comment, { t: i18next.t });
18859
+ }
18685
18860
  switch (command) {
18686
18861
  case "descs":
18687
18862
  if (result >= 0) process_treedb_descs(gobj, data);
@@ -19217,7 +19392,7 @@ function create_gclass$3(gclass_name) {
19217
19392
  null
19218
19393
  ]
19219
19394
  ]]];
19220
- __gclass__$3 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, [
19395
+ const event_types = [
19221
19396
  ["EV_MT_COMMAND_ANSWER", _yuneta_gobj_js.event_flag_t.EVF_PUBLIC_EVENT],
19222
19397
  ["EV_TREEDB_NODE_CREATED", _yuneta_gobj_js.event_flag_t.EVF_PUBLIC_EVENT],
19223
19398
  ["EV_TREEDB_NODE_UPDATED", _yuneta_gobj_js.event_flag_t.EVF_PUBLIC_EVENT],
@@ -19246,7 +19421,8 @@ function create_gclass$3(gclass_name) {
19246
19421
  ["EV_SHOW", 0],
19247
19422
  ["EV_HIDE", 0],
19248
19423
  ["EV_TRANSPORT_STATE", 0]
19249
- ], states, gmt$3, 0, attrs_table$3, PRIVATE_DATA$3, 0, 0, 0, 0);
19424
+ ];
19425
+ __gclass__$3 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$3, 0, attrs_table$3, PRIVATE_DATA$3, 0, 0, 0, 0);
19250
19426
  if (!__gclass__$3) return -1;
19251
19427
  return 0;
19252
19428
  }
@@ -19325,14 +19501,15 @@ function mt_destroy$2(gobj) {
19325
19501
  * Build UI
19326
19502
  ************************************************************/
19327
19503
  function build_ui$2(gobj) {
19328
- (0, _yuneta_gobj_js.gobj_write_attr)(gobj, "$container", (0, _yuneta_gobj_js.createElement2)([
19504
+ let $container = (0, _yuneta_gobj_js.createElement2)([
19329
19505
  "div",
19330
19506
  {
19331
19507
  class: "C_YUI_TREEDB_SCHEMA TREEDB_SCHEMA_VIEW",
19332
19508
  style: "position:relative; height:100%; min-height:0;"
19333
19509
  },
19334
19510
  []
19335
- ]));
19511
+ ]);
19512
+ (0, _yuneta_gobj_js.gobj_write_attr)(gobj, "$container", $container);
19336
19513
  }
19337
19514
  /************************************************************
19338
19515
  * Derive {nodes, edges} from the schema.
@@ -19457,7 +19634,8 @@ function build_graph$1(gobj) {
19457
19634
  priv.graph = graph;
19458
19635
  graph.setTheme(dark ? "dark" : "light");
19459
19636
  graph.on(_antv_g6.NodeEvent.CLICK, (evt) => {
19460
- (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_NODE_CLICK", { node_id: evt && evt.target && evt.target.id }, gobj);
19637
+ let node_id = evt && evt.target && evt.target.id;
19638
+ (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_NODE_CLICK", { node_id }, gobj);
19461
19639
  });
19462
19640
  graph.render().then(() => {
19463
19641
  try {
@@ -23586,7 +23764,6 @@ function segmentToCubic(segment, params) {
23586
23764
  py
23587
23765
  ];
23588
23766
  return ["C"].concat(lineToCubic(px1, py1, px, py));
23589
- default:
23590
23767
  }
23591
23768
  return segment;
23592
23769
  }
@@ -23610,7 +23787,8 @@ function path2Curve(pathInput, needZCommandIndexes) {
23610
23787
  for (var i = 0; i < ii; i += 1) {
23611
23788
  if (path[i]) pathCommand = path[i][0];
23612
23789
  allPathCommands[i] = pathCommand;
23613
- path[i] = segmentToCubic(path[i], params);
23790
+ var curveSegment = segmentToCubic(path[i], params);
23791
+ path[i] = curveSegment;
23614
23792
  fixArc(path, allPathCommands, i);
23615
23793
  ii = path.length;
23616
23794
  if (pathCommand === "Z") zCommandIndexes.push(i);
@@ -23662,20 +23840,22 @@ function segmentLineFactory(x1, y1, x2, y2, distance) {
23662
23840
  x: 0,
23663
23841
  y: 0
23664
23842
  };
23665
- if (typeof distance === "number") if (distance <= 0) point = {
23666
- x: x1,
23667
- y: y1
23668
- };
23669
- else if (distance >= length) point = {
23670
- x: x2,
23671
- y: y2
23672
- };
23673
- else {
23674
- var _a = midPoint([x1, y1], [x2, y2], distance / length);
23675
- point = {
23676
- x: _a[0],
23677
- y: _a[1]
23843
+ if (typeof distance === "number") {
23844
+ if (distance <= 0) point = {
23845
+ x: x1,
23846
+ y: y1
23678
23847
  };
23848
+ else if (distance >= length) point = {
23849
+ x: x2,
23850
+ y: y2
23851
+ };
23852
+ else {
23853
+ var _a = midPoint([x1, y1], [x2, y2], distance / length);
23854
+ point = {
23855
+ x: _a[0],
23856
+ y: _a[1]
23857
+ };
23858
+ }
23679
23859
  }
23680
23860
  return {
23681
23861
  length,
@@ -25231,7 +25411,11 @@ var Rectangle = /*#__PURE__*/ function() {
25231
25411
  value: function toJSON() {}
25232
25412
  }], [{
25233
25413
  key: "fromRect",
25234
- value: function fromRect(rect) {
25414
+ value:
25415
+ /**
25416
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/fromRect_static
25417
+ */
25418
+ function fromRect(rect) {
25235
25419
  return new Rectangle(rect.x, rect.y, rect.width, rect.height);
25236
25420
  }
25237
25421
  }, {
@@ -25321,14 +25505,15 @@ function getEulerFromMat4(out, m) {
25321
25505
  var z;
25322
25506
  var _mat4$getScaling2 = _slicedToArray(getScaling(create$3(), m), 3), sx = _mat4$getScaling2[0], sy = _mat4$getScaling2[1], sz = _mat4$getScaling2[2];
25323
25507
  var y = Math.asin(-m[2] / sx);
25324
- if (y < HALF_PI) if (y > -HALF_PI) {
25325
- x = Math.atan2(m[6] / sy, m[10] / sz);
25326
- z = Math.atan2(m[1] / sx, m[0] / sx);
25508
+ if (y < HALF_PI) {
25509
+ if (y > -HALF_PI) {
25510
+ x = Math.atan2(m[6] / sy, m[10] / sz);
25511
+ z = Math.atan2(m[1] / sx, m[0] / sx);
25512
+ } else {
25513
+ z = 0;
25514
+ x = -Math.atan2(m[4] / sy, m[5] / sy);
25515
+ }
25327
25516
  } else {
25328
- z = 0;
25329
- x = -Math.atan2(m[4] / sy, m[5] / sy);
25330
- }
25331
- else {
25332
25517
  z = 0;
25333
25518
  x = Math.atan2(m[4] / sy, m[5] / sy);
25334
25519
  }
@@ -25395,8 +25580,10 @@ function decompose(mat) {
25395
25580
  var row1y = mat[4];
25396
25581
  var scalingX = Math.sqrt(row0x * row0x + row0y * row0y);
25397
25582
  var scalingY = Math.sqrt(row1x * row1x + row1y * row1y);
25398
- if (row0x * row1y - row0y * row1x < 0) if (row0x < row1y) scalingX = -scalingX;
25399
- else scalingY = -scalingY;
25583
+ if (row0x * row1y - row0y * row1x < 0) {
25584
+ if (row0x < row1y) scalingX = -scalingX;
25585
+ else scalingY = -scalingY;
25586
+ }
25400
25587
  if (scalingX) {
25401
25588
  var invScalingX = 1 / scalingX;
25402
25589
  row0x *= invScalingX;
@@ -26370,9 +26557,10 @@ function updateLocalTransform(transform) {
26370
26557
  var hasRotation = localRotation[3] !== 1 || localRotation[0] !== 0 || localRotation[1] !== 0 || localRotation[2] !== 0;
26371
26558
  var hasScale = localScale[0] !== 1 || localScale[1] !== 1 || localScale[2] !== 1;
26372
26559
  var hasOrigin = origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0;
26373
- if (!hasRotation && !hasScale && !hasOrigin) if (hasPosition) fromTranslation(localTransform, localPosition);
26374
- else identity(localTransform);
26375
- else fromRotationTranslationScaleOrigin(localTransform, localRotation, localPosition, localScale, origin);
26560
+ if (!hasRotation && !hasScale && !hasOrigin) {
26561
+ if (hasPosition) fromTranslation(localTransform, localPosition);
26562
+ else identity(localTransform);
26563
+ } else fromRotationTranslationScaleOrigin(localTransform, localRotation, localPosition, localScale, origin);
26376
26564
  }
26377
26565
  transform.localDirtyFlag = false;
26378
26566
  }
@@ -26960,9 +27148,7 @@ var conversionToCanonicalUnitsScaleFactor = function conversionToCanonicalUnitsS
26960
27148
  case UnitType.kGradians:
26961
27149
  factor = .9;
26962
27150
  break;
26963
- case UnitType.kTurns:
26964
- factor = 360;
26965
- break;
27151
+ case UnitType.kTurns: factor = 360;
26966
27152
  }
26967
27153
  return factor;
26968
27154
  };
@@ -27136,9 +27322,10 @@ var CSSKeywordValue = /*#__PURE__*/ function(_CSSStyleValue) {
27136
27322
  var formatInfinityOrNaN = function formatInfinityOrNaN(number) {
27137
27323
  var suffix = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
27138
27324
  var result = "";
27139
- if (!Number.isFinite(number)) if (number > 0) result = "infinity";
27140
- else result = "-infinity";
27141
- else result = "NaN";
27325
+ if (!Number.isFinite(number)) {
27326
+ if (number > 0) result = "infinity";
27327
+ else result = "-infinity";
27328
+ } else result = "NaN";
27142
27329
  return result += suffix;
27143
27330
  };
27144
27331
  var toCanonicalUnit = function toCanonicalUnit(unit) {
@@ -27707,8 +27894,10 @@ var parseGradient = memoize(function(colorStr) {
27707
27894
  }
27708
27895
  } else if (type === "r") {
27709
27896
  var parsedRadialGradient = parseRadialGradient(colorStr);
27710
- if (parsedRadialGradient) if (isString(parsedRadialGradient)) colorStr = parsedRadialGradient;
27711
- else return [new CSSGradientValue(GradientType.RadialGradient, parsedRadialGradient)];
27897
+ if (parsedRadialGradient) {
27898
+ if (isString(parsedRadialGradient)) colorStr = parsedRadialGradient;
27899
+ else return [new CSSGradientValue(GradientType.RadialGradient, parsedRadialGradient)];
27900
+ }
27712
27901
  } else if (type === "p") return parsePattern(colorStr);
27713
27902
  }
27714
27903
  });
@@ -28125,7 +28314,6 @@ function getPathBBox(segments, lineWidth) {
28125
28314
  default:
28126
28315
  xArr.push(currentPoint[0]);
28127
28316
  yArr.push(currentPoint[1]);
28128
- break;
28129
28317
  }
28130
28318
  if (box$1) {
28131
28319
  segment.box = box$1;
@@ -28300,9 +28488,7 @@ function path2Segments(path) {
28300
28488
  startMovePoint = [params[1], params[2]];
28301
28489
  lastStartMovePointIndex = i;
28302
28490
  break;
28303
- case "A":
28304
- segment.arcParams = getArcParams(currentPoint, params);
28305
- break;
28491
+ case "A": segment.arcParams = getArcParams(currentPoint, params);
28306
28492
  }
28307
28493
  if (command === "Z") {
28308
28494
  currentPoint = startMovePoint;
@@ -29589,10 +29775,12 @@ var parseTransformOrigin = memoize(function(value) {
29589
29775
  if (isString(value)) {
29590
29776
  if (value === "text-anchor") return [getOrCreateUnitValue(0, "px"), getOrCreateUnitValue(0, "px")];
29591
29777
  var values = value.split(" ");
29592
- if (values.length === 1) if (values[0] === "top" || values[0] === "bottom") {
29593
- values[1] = values[0];
29594
- values[0] = "center";
29595
- } else values[1] = "center";
29778
+ if (values.length === 1) {
29779
+ if (values[0] === "top" || values[0] === "bottom") {
29780
+ values[1] = values[0];
29781
+ values[0] = "center";
29782
+ } else values[1] = "center";
29783
+ }
29596
29784
  if (values.length !== 2) return null;
29597
29785
  return [parseLengthOrPercentage(convertKeyword2Percent(values[0])), parseLengthOrPercentage(convertKeyword2Percent(values[1]))];
29598
29786
  }
@@ -30470,7 +30658,14 @@ var CSSPropertyLengthOrPercentage = /*#__PURE__*/ function() {
30470
30658
  }
30471
30659
  return _createClass(CSSPropertyLengthOrPercentage, [{
30472
30660
  key: "calculator",
30473
- value: function calculator(name, oldParsed, computed, object, runtime) {
30661
+ value:
30662
+ /**
30663
+ * according to parent's bounds
30664
+ *
30665
+ * @example
30666
+ * CSS.percent(50) -> CSS.px(0.5 * parent.width)
30667
+ */
30668
+ function calculator(name, oldParsed, computed, object, runtime) {
30474
30669
  if (isNumber(computed)) return computed;
30475
30670
  if (CSSUnitValue.isRelativeUnit(computed.unit)) {
30476
30671
  if (computed.unit === UnitType.kPercentage) return 0;
@@ -31387,7 +31582,19 @@ var FederatedEvent = /*#__PURE__*/ function() {
31387
31582
  return _createClass(FederatedEvent, [
31388
31583
  {
31389
31584
  key: "name",
31390
- get: function get() {
31585
+ get:
31586
+ /**
31587
+ * The type of event, supports the following:
31588
+ * * pointerdown
31589
+ * * touchstart
31590
+ * * mousedown
31591
+ * * rightdown
31592
+ * * ...
31593
+ */
31594
+ /**
31595
+ * @deprecated
31596
+ */
31597
+ function get() {
31391
31598
  return this.type;
31392
31599
  }
31393
31600
  },
@@ -31453,7 +31660,15 @@ var FederatedEvent = /*#__PURE__*/ function() {
31453
31660
  },
31454
31661
  {
31455
31662
  key: "composedPath",
31456
- value: function composedPath() {
31663
+ value:
31664
+ /**
31665
+ * The propagation path for this event
31666
+ * @see https://developer.mozilla.org/zh-CN/docs/Web/API/Event/composedPath
31667
+ *
31668
+ * So composedPath()[0] represents the original target.
31669
+ * @see https://polymer-library.polymer-project.org/3.0/docs/devguide/events#retargeting
31670
+ */
31671
+ function composedPath() {
31457
31672
  if (this.manager && (!this.path || this.path[0] !== this.target)) this.path = this.target ? this.manager.propagationPath(this.target) : [];
31458
31673
  return this.path;
31459
31674
  }
@@ -31485,7 +31700,12 @@ var FederatedEvent = /*#__PURE__*/ function() {
31485
31700
  },
31486
31701
  {
31487
31702
  key: "initEvent",
31488
- value: function initEvent() {}
31703
+ value:
31704
+ /**
31705
+ * added for compatibility with DOM Event,
31706
+ * deprecated props and methods
31707
+ */
31708
+ function initEvent() {}
31489
31709
  },
31490
31710
  {
31491
31711
  key: "initUIEvent",
@@ -31648,7 +31868,43 @@ var FederatedPointerEvent = /*#__PURE__*/ function(_FederatedMouseEvent) {
31648
31868
  return _createClass(FederatedPointerEvent, [
31649
31869
  {
31650
31870
  key: "getCoalescedEvents",
31651
- value: function getCoalescedEvents() {
31871
+ value:
31872
+ /**
31873
+ * The type of pointer that triggered the event.
31874
+ *
31875
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerType
31876
+ */
31877
+ /**
31878
+ * Pressure applied by the pointing device during the event.
31879
+ *s
31880
+ * A Touch's force property will be represented by this value.
31881
+ *
31882
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pressure
31883
+ */
31884
+ /**
31885
+ * Barrel pressure on a stylus pointer.
31886
+ *
31887
+ * @see https://w3c.github.io/pointerevents/#pointerevent-interface
31888
+ */
31889
+ /**
31890
+ * The angle, in degrees, between the pointer device and the screen.
31891
+ *
31892
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltX
31893
+ */
31894
+ /**
31895
+ * The angle, in degrees, between the pointer device and the screen.
31896
+ *
31897
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltY
31898
+ */
31899
+ /**
31900
+ * Twist of a stylus pointer.
31901
+ *
31902
+ * @see https://w3c.github.io/pointerevents/#pointerevent-interface
31903
+ */
31904
+ /**
31905
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/getCoalescedEvents
31906
+ */
31907
+ function getCoalescedEvents() {
31652
31908
  if (this.type === "pointermove" || this.type === "mousemove" || this.type === "touchmove") return [this];
31653
31909
  return [];
31654
31910
  }
@@ -31675,7 +31931,15 @@ var FederatedWheelEvent = /*#__PURE__*/ function(_FederatedMouseEvent) {
31675
31931
  _inherits(FederatedWheelEvent, _FederatedMouseEvent);
31676
31932
  return _createClass(FederatedWheelEvent, [{
31677
31933
  key: "clone",
31678
- value: function clone() {
31934
+ value:
31935
+ /**
31936
+ * The units of `deltaX`, `deltaY`, and `deltaZ`. This is one of `DOM_DELTA_LINE`,
31937
+ * `DOM_DELTA_PAGE`, `DOM_DELTA_PIXEL`.
31938
+ */
31939
+ /** Horizontal scroll amount */
31940
+ /** Vertical scroll amount */
31941
+ /** z-axis scroll amount. */
31942
+ function clone() {
31679
31943
  return this.manager.cloneWheelEvent(this);
31680
31944
  }
31681
31945
  }]);
@@ -31764,7 +32028,11 @@ var Node$1 = /*#__PURE__*/ function(_EventTarget) {
31764
32028
  return _createClass(Node, [
31765
32029
  {
31766
32030
  key: "textContent",
31767
- get: function get() {
32031
+ get:
32032
+ /**
32033
+ * @see https://developer.mozilla.org/zh-CN/docs/Web/API/Node/textContent
32034
+ */
32035
+ function get() {
31768
32036
  var out = "";
31769
32037
  if (this.nodeName === Shape.TEXT) out += this.style.text;
31770
32038
  var _iterator = _createForOfIteratorHelper(this.childNodes), _step;
@@ -31842,7 +32110,12 @@ var Node$1 = /*#__PURE__*/ function(_EventTarget) {
31842
32110
  },
31843
32111
  {
31844
32112
  key: "parent",
31845
- get: function get() {
32113
+ get:
32114
+ /**
32115
+ * @deprecated
32116
+ * @alias parentNode
32117
+ */
32118
+ function get() {
31846
32119
  return this.parentNode;
31847
32120
  }
31848
32121
  },
@@ -31912,7 +32185,12 @@ var Node$1 = /*#__PURE__*/ function(_EventTarget) {
31912
32185
  },
31913
32186
  {
31914
32187
  key: "contain",
31915
- value: function contain(other) {
32188
+ value:
32189
+ /**
32190
+ * @deprecated
32191
+ * @alias contains
32192
+ */
32193
+ function contain(other) {
31916
32194
  return this.contains(other);
31917
32195
  }
31918
32196
  },
@@ -31963,7 +32241,12 @@ var Node$1 = /*#__PURE__*/ function(_EventTarget) {
31963
32241
  return _createClass(EventTarget, [
31964
32242
  {
31965
32243
  key: "on",
31966
- value: function on(type, listener, options) {
32244
+ value:
32245
+ /**
32246
+ * @deprecated
32247
+ * @alias addEventListener
32248
+ */
32249
+ function on(type, listener, options) {
31967
32250
  this.addEventListener(type, listener, options);
31968
32251
  return this;
31969
32252
  }
@@ -32126,7 +32409,11 @@ var OffscreenCanvasCreator = /*#__PURE__*/ function() {
32126
32409
  }
32127
32410
  }], [{
32128
32411
  key: "createCanvas",
32129
- value: function createCanvas() {
32412
+ value:
32413
+ /**
32414
+ * @returns new canvas instance
32415
+ */
32416
+ function createCanvas() {
32130
32417
  try {
32131
32418
  return new window.OffscreenCanvas(0, 0);
32132
32419
  } catch (_unused2) {}
@@ -32749,10 +33036,12 @@ var DefaultSceneGraphService = /*#__PURE__*/ function() {
32749
33036
  var aabb = this.getTransformedGeometryBounds(element, render, existedAABB);
32750
33037
  element.childNodes.forEach(function(child) {
32751
33038
  var childBounds = _this.getBounds(child, render);
32752
- if (childBounds) if (!aabb) {
32753
- aabb = existedAABB || new AABB();
32754
- aabb.update(childBounds.center, childBounds.halfExtents);
32755
- } else aabb.add(childBounds);
33039
+ if (childBounds) {
33040
+ if (!aabb) {
33041
+ aabb = existedAABB || new AABB();
33042
+ aabb.update(childBounds.center, childBounds.halfExtents);
33043
+ } else aabb.add(childBounds);
33044
+ }
32756
33045
  });
32757
33046
  if (!aabb) aabb = new AABB();
32758
33047
  if (render) {
@@ -32959,12 +33248,14 @@ var DefaultSceneGraphService = /*#__PURE__*/ function() {
32959
33248
  var mutations = /* @__PURE__ */ new Set();
32960
33249
  canvas.getRoot().forEach(function(item) {
32961
33250
  (item.mutations || []).forEach(function(mutation) {
32962
- if (mutation.type === "attributes" && mutation._boundsChangeData) if (mutation._boundsChangeData.affectChildren) item.forEach(function(node) {
32963
- var newMutation = _objectSpread2({}, mutation);
32964
- newMutation.target = node;
32965
- mutations.add(newMutation);
32966
- });
32967
- else mutations.add(mutation);
33251
+ if (mutation.type === "attributes" && mutation._boundsChangeData) {
33252
+ if (mutation._boundsChangeData.affectChildren) item.forEach(function(node) {
33253
+ var newMutation = _objectSpread2({}, mutation);
33254
+ newMutation.target = node;
33255
+ mutations.add(newMutation);
33256
+ });
33257
+ else mutations.add(mutation);
33258
+ }
32968
33259
  });
32969
33260
  item.mutations = void 0;
32970
33261
  });
@@ -33139,7 +33430,15 @@ var TextService = /*#__PURE__*/ function() {
33139
33430
  return _createClass(TextService, [
33140
33431
  {
33141
33432
  key: "measureFont",
33142
- value: function measureFont(font, offscreenCanvas) {
33433
+ value:
33434
+ /**
33435
+ * A global cache for character widths, keyed by font string.
33436
+ * e.g. { '16px Arial': { 'a': 8, 'b': 9 } }
33437
+ */
33438
+ /**
33439
+ * Calculates the ascent, descent and fontSize of a given font-style.
33440
+ */
33441
+ function measureFont(font, offscreenCanvas) {
33143
33442
  if (this.fontMetricsCache[font]) return this.fontMetricsCache[font];
33144
33443
  var properties = {
33145
33444
  ascent: 0,
@@ -33637,7 +33936,18 @@ var Element$1 = /*#__PURE__*/ function(_Node) {
33637
33936
  return _createClass(Element, [
33638
33937
  {
33639
33938
  key: "dirty",
33640
- value: function dirty() {
33939
+ value:
33940
+ /**
33941
+ * Marks the element as dirty, indicating it needs re-rendering or relayout.
33942
+ *
33943
+ * @param styleFlag - Whether to update style state (default: true).
33944
+ * When true, sets `renderable.dirty` to true.
33945
+ * @param layoutFlag - Optional. When provided, updates layout-related dirty flags:
33946
+ * - `renderable.boundsDirty`
33947
+ * - `renderable.renderBoundsDirty`
33948
+ * - `geometry.dirty`
33949
+ */
33950
+ function dirty() {
33641
33951
  var styleFlag = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
33642
33952
  var layoutFlag = arguments.length > 1 ? arguments[1] : void 0;
33643
33953
  this.renderable.dirty = styleFlag;
@@ -33650,7 +33960,16 @@ var Element$1 = /*#__PURE__*/ function(_Node) {
33650
33960
  },
33651
33961
  {
33652
33962
  key: "className",
33653
- get: function get() {
33963
+ get:
33964
+ /**
33965
+ * used with `getElementById()`
33966
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/id
33967
+ */
33968
+ /**
33969
+ * used in `getElementsByClassName`
33970
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName
33971
+ */
33972
+ function get() {
33654
33973
  return this.getAttribute("class") || "";
33655
33974
  },
33656
33975
  set: function set(className) {
@@ -33659,7 +33978,11 @@ var Element$1 = /*#__PURE__*/ function(_Node) {
33659
33978
  },
33660
33979
  {
33661
33980
  key: "classList",
33662
- get: function get() {
33981
+ get:
33982
+ /**
33983
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/classList
33984
+ */
33985
+ function get() {
33663
33986
  return this.className.split(" ").filter(function(c) {
33664
33987
  return c !== "";
33665
33988
  });
@@ -33733,8 +34056,10 @@ var Element$1 = /*#__PURE__*/ function(_Node) {
33733
34056
  var _this$ownerDocument;
33734
34057
  if (child.destroyed) throw new Error(ERROR_MSG_APPEND_DESTROYED_ELEMENT);
33735
34058
  runtime.sceneGraphService.attach(child, this, index);
33736
- if ((_this$ownerDocument = this.ownerDocument) !== null && _this$ownerDocument !== void 0 && _this$ownerDocument.defaultView) if (!isInFragment(this) && child.nodeName === Shape.FRAGMENT) this.ownerDocument.defaultView.mountFragment(child);
33737
- else this.ownerDocument.defaultView.mountChildren(child);
34059
+ if ((_this$ownerDocument = this.ownerDocument) !== null && _this$ownerDocument !== void 0 && _this$ownerDocument.defaultView) {
34060
+ if (!isInFragment(this) && child.nodeName === Shape.FRAGMENT) this.ownerDocument.defaultView.mountFragment(child);
34061
+ else this.ownerDocument.defaultView.mountChildren(child);
34062
+ }
33738
34063
  if (this.isMutationObserved) {
33739
34064
  insertedEvent.relatedNode = this;
33740
34065
  child.dispatchEvent(insertedEvent);
@@ -34000,13 +34325,22 @@ var Element$1 = /*#__PURE__*/ function(_Node) {
34000
34325
  },
34001
34326
  {
34002
34327
  key: "computedStyleMap",
34003
- value: function computedStyleMap() {
34328
+ value:
34329
+ /**
34330
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/computedStyleMap
34331
+ * eg. circle.computedStyleMap().get('fill');
34332
+ */
34333
+ function computedStyleMap() {
34004
34334
  return new Map(Object.entries(this.computedStyle));
34005
34335
  }
34006
34336
  },
34007
34337
  {
34008
34338
  key: "getAttributeNames",
34009
- value: function getAttributeNames() {
34339
+ value:
34340
+ /**
34341
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttributeNames
34342
+ */
34343
+ function getAttributeNames() {
34010
34344
  return Object.keys(this.attributes);
34011
34345
  }
34012
34346
  },
@@ -36650,7 +36984,11 @@ var HTMLRenderingPlugin = /*#__PURE__*/ function() {
36650
36984
  return _createClass(HTMLRenderingPlugin, [
36651
36985
  {
36652
36986
  key: "joinTransformMatrix",
36653
- value: function joinTransformMatrix(matrix) {
36987
+ value:
36988
+ /**
36989
+ * ! The reason for adding `offset` is that the `transform-origin` coordinate system of DOM is the local coordinate system of the element, while the `transform-origin` coordinate system of canvas drawing is the local coordinate system of the element's parent element. At the same time, the `transform` attribute value of the DOM element does not include `transform-origin`.
36990
+ */
36991
+ function joinTransformMatrix(matrix) {
36654
36992
  var offset = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [
36655
36993
  0,
36656
36994
  0,
@@ -36849,18 +37187,20 @@ var HTMLRenderingPlugin = /*#__PURE__*/ function() {
36849
37187
  case "fill":
36850
37188
  var fill = object.parsedStyle.fill;
36851
37189
  var color = "";
36852
- if (isCSSRGB(fill)) if (fill.isNone) color = "transparent";
36853
- else color = object.getAttribute("fill");
36854
- else if (Array.isArray(fill)) color = object.getAttribute("fill");
37190
+ if (isCSSRGB(fill)) {
37191
+ if (fill.isNone) color = "transparent";
37192
+ else color = object.getAttribute("fill");
37193
+ } else if (Array.isArray(fill)) color = object.getAttribute("fill");
36855
37194
  else if (isPattern(fill));
36856
37195
  $el.style.background = color;
36857
37196
  break;
36858
37197
  case "stroke":
36859
37198
  var stroke = object.parsedStyle.stroke;
36860
37199
  var borderColor = "";
36861
- if (isCSSRGB(stroke)) if (stroke.isNone) borderColor = "transparent";
36862
- else borderColor = object.getAttribute("stroke");
36863
- else if (Array.isArray(stroke)) borderColor = object.getAttribute("stroke");
37200
+ if (isCSSRGB(stroke)) {
37201
+ if (stroke.isNone) borderColor = "transparent";
37202
+ else borderColor = object.getAttribute("stroke");
37203
+ } else if (Array.isArray(stroke)) borderColor = object.getAttribute("stroke");
36864
37204
  else if (isPattern(stroke));
36865
37205
  $el.style["border-color"] = borderColor;
36866
37206
  $el.style["border-style"] = "solid";
@@ -37552,8 +37892,10 @@ PERFORMANCE OF THIS SOFTWARE.
37552
37892
  if (classType === CJ) return types.push(lineBreak === "strict" ? NS : ID);
37553
37893
  if (classType === SA) return types.push(AL);
37554
37894
  if (classType === AI) return types.push(AL);
37555
- if (classType === XX) if (codePoint >= 131072 && codePoint <= 196605 || codePoint >= 196608 && codePoint <= 262141) return types.push(ID);
37556
- else return types.push(AL);
37895
+ if (classType === XX) {
37896
+ if (codePoint >= 131072 && codePoint <= 196605 || codePoint >= 196608 && codePoint <= 262141) return types.push(ID);
37897
+ else return types.push(AL);
37898
+ }
37557
37899
  types.push(classType);
37558
37900
  });
37559
37901
  return [
@@ -38215,12 +38557,13 @@ PERFORMANCE OF THIS SOFTWARE.
38215
38557
  } else if (codePoint === QUOTATION_MARK || codePoint === APOSTROPHE || codePoint === LEFT_PARENTHESIS || isNonPrintableCodePoint(codePoint)) {
38216
38558
  this.consumeBadUrlRemnants();
38217
38559
  return BAD_URL_TOKEN;
38218
- } else if (codePoint === REVERSE_SOLIDUS) if (isValidEscape(codePoint, this.peekCodePoint(0))) value.push(this.consumeEscapedCodePoint());
38219
- else {
38220
- this.consumeBadUrlRemnants();
38221
- return BAD_URL_TOKEN;
38222
- }
38223
- else value.push(codePoint);
38560
+ } else if (codePoint === REVERSE_SOLIDUS) {
38561
+ if (isValidEscape(codePoint, this.peekCodePoint(0))) value.push(this.consumeEscapedCodePoint());
38562
+ else {
38563
+ this.consumeBadUrlRemnants();
38564
+ return BAD_URL_TOKEN;
38565
+ }
38566
+ } else value.push(codePoint);
38224
38567
  }
38225
38568
  };
38226
38569
  Tokenizer.prototype.consumeWhiteSpace = function() {
@@ -38964,15 +39307,13 @@ PERFORMANCE OF THIS SOFTWARE.
38964
39307
  ry = Math.max(Math.abs(y), Math.abs(y - height));
38965
39308
  }
38966
39309
  break;
38967
- case 3:
38968
- if (gradient.shape === 0) rx = ry = Math.max(distance(x, y), distance(x, y - height), distance(x - width, y), distance(x - width, y - height));
38969
- else if (gradient.shape === 1) {
38970
- var c = Math.max(Math.abs(y), Math.abs(y - height)) / Math.max(Math.abs(x), Math.abs(x - width));
38971
- var _b = findCorner(width, height, x, y, false), cx = _b[0], cy = _b[1];
38972
- rx = distance(cx - x, (cy - y) / c);
38973
- ry = c * rx;
38974
- }
38975
- break;
39310
+ case 3: if (gradient.shape === 0) rx = ry = Math.max(distance(x, y), distance(x, y - height), distance(x - width, y), distance(x - width, y - height));
39311
+ else if (gradient.shape === 1) {
39312
+ var c = Math.max(Math.abs(y), Math.abs(y - height)) / Math.max(Math.abs(x), Math.abs(x - width));
39313
+ var _b = findCorner(width, height, x, y, false), cx = _b[0], cy = _b[1];
39314
+ rx = distance(cx - x, (cy - y) / c);
39315
+ ry = c * rx;
39316
+ }
38976
39317
  }
38977
39318
  if (Array.isArray(gradient.size)) {
38978
39319
  rx = getAbsoluteValue(gradient.size[0], width);
@@ -39952,7 +40293,6 @@ PERFORMANCE OF THIS SOFTWARE.
39952
40293
  case 4:
39953
40294
  results.push(accumulator.join(" "));
39954
40295
  accumulator.length = 0;
39955
- break;
39956
40296
  }
39957
40297
  });
39958
40298
  if (accumulator.length) results.push(accumulator.join(" "));
@@ -40161,9 +40501,7 @@ PERFORMANCE OF THIS SOFTWARE.
40161
40501
  case "fill":
40162
40502
  layers.push(0);
40163
40503
  break;
40164
- case "markers":
40165
- layers.push(2);
40166
- break;
40504
+ case "markers": layers.push(2);
40167
40505
  }
40168
40506
  });
40169
40507
  DEFAULT_VALUE.forEach(function(value) {
@@ -40309,20 +40647,18 @@ PERFORMANCE OF THIS SOFTWARE.
40309
40647
  case 0: return descriptor.parse(context, parser.parseComponentValue());
40310
40648
  case 1: return descriptor.parse(context, parser.parseComponentValues());
40311
40649
  case 4: return parser.parseComponentValue();
40312
- case 3:
40313
- switch (descriptor.format) {
40314
- case "angle": return angle.parse(context, parser.parseComponentValue());
40315
- case "color": return color$1.parse(context, parser.parseComponentValue());
40316
- case "image": return image.parse(context, parser.parseComponentValue());
40317
- case "length":
40318
- var length_1 = parser.parseComponentValue();
40319
- return isLength(length_1) ? length_1 : ZERO_LENGTH;
40320
- case "length-percentage":
40321
- var value_1 = parser.parseComponentValue();
40322
- return isLengthPercentage(value_1) ? value_1 : ZERO_LENGTH;
40323
- case "time": return time.parse(context, parser.parseComponentValue());
40324
- }
40325
- break;
40650
+ case 3: switch (descriptor.format) {
40651
+ case "angle": return angle.parse(context, parser.parseComponentValue());
40652
+ case "color": return color$1.parse(context, parser.parseComponentValue());
40653
+ case "image": return image.parse(context, parser.parseComponentValue());
40654
+ case "length":
40655
+ var length_1 = parser.parseComponentValue();
40656
+ return isLength(length_1) ? length_1 : ZERO_LENGTH;
40657
+ case "length-percentage":
40658
+ var value_1 = parser.parseComponentValue();
40659
+ return isLengthPercentage(value_1) ? value_1 : ZERO_LENGTH;
40660
+ case "time": return time.parse(context, parser.parseComponentValue());
40661
+ }
40326
40662
  }
40327
40663
  };
40328
40664
  var elementDebuggerAttribute = "data-html2canvas-debug";
@@ -40807,22 +41143,23 @@ PERFORMANCE OF THIS SOFTWARE.
40807
41143
  var textBounds = [];
40808
41144
  var offset = 0;
40809
41145
  textList.forEach(function(text) {
40810
- if (styles.textDecorationLine.length || text.trim().length > 0) if (FEATURES.SUPPORT_RANGE_BOUNDS) {
40811
- var clientRects = createRange(node, offset, text.length).getClientRects();
40812
- if (clientRects.length > 1) {
40813
- var subSegments = segmentGraphemes(text);
40814
- var subOffset_1 = 0;
40815
- subSegments.forEach(function(subSegment) {
40816
- textBounds.push(new TextBounds(subSegment, Bounds.fromDOMRectList(context, createRange(node, subOffset_1 + offset, subSegment.length).getClientRects())));
40817
- subOffset_1 += subSegment.length;
40818
- });
40819
- } else textBounds.push(new TextBounds(text, Bounds.fromDOMRectList(context, clientRects)));
40820
- } else {
40821
- var replacementNode = node.splitText(text.length);
40822
- textBounds.push(new TextBounds(text, getWrapperBounds(context, node)));
40823
- node = replacementNode;
40824
- }
40825
- else if (!FEATURES.SUPPORT_RANGE_BOUNDS) node = node.splitText(text.length);
41146
+ if (styles.textDecorationLine.length || text.trim().length > 0) {
41147
+ if (FEATURES.SUPPORT_RANGE_BOUNDS) {
41148
+ var clientRects = createRange(node, offset, text.length).getClientRects();
41149
+ if (clientRects.length > 1) {
41150
+ var subSegments = segmentGraphemes(text);
41151
+ var subOffset_1 = 0;
41152
+ subSegments.forEach(function(subSegment) {
41153
+ textBounds.push(new TextBounds(subSegment, Bounds.fromDOMRectList(context, createRange(node, subOffset_1 + offset, subSegment.length).getClientRects())));
41154
+ subOffset_1 += subSegment.length;
41155
+ });
41156
+ } else textBounds.push(new TextBounds(text, Bounds.fromDOMRectList(context, clientRects)));
41157
+ } else {
41158
+ var replacementNode = node.splitText(text.length);
41159
+ textBounds.push(new TextBounds(text, getWrapperBounds(context, node)));
41160
+ node = replacementNode;
41161
+ }
41162
+ } else if (!FEATURES.SUPPORT_RANGE_BOUNDS) node = node.splitText(text.length);
40826
41163
  offset += text.length;
40827
41164
  });
40828
41165
  return textBounds;
@@ -41027,9 +41364,7 @@ PERFORMANCE OF THIS SOFTWARE.
41027
41364
  case CHECKBOX:
41028
41365
  _this.styles.borderTopRightRadius = _this.styles.borderTopLeftRadius = _this.styles.borderBottomRightRadius = _this.styles.borderBottomLeftRadius = CHECKBOX_BORDER_RADIUS;
41029
41366
  break;
41030
- case RADIO:
41031
- _this.styles.borderTopRightRadius = _this.styles.borderTopLeftRadius = _this.styles.borderBottomRightRadius = _this.styles.borderBottomLeftRadius = RADIO_BORDER_RADIUS;
41032
- break;
41367
+ case RADIO: _this.styles.borderTopRightRadius = _this.styles.borderTopLeftRadius = _this.styles.borderBottomRightRadius = _this.styles.borderBottomLeftRadius = RADIO_BORDER_RADIUS;
41033
41368
  }
41034
41369
  return _this;
41035
41370
  }
@@ -41083,19 +41418,21 @@ PERFORMANCE OF THIS SOFTWARE.
41083
41418
  for (var childNode = node.firstChild, nextNode = void 0; childNode; childNode = nextNode) {
41084
41419
  nextNode = childNode.nextSibling;
41085
41420
  if (isTextNode(childNode) && childNode.data.trim().length > 0) parent.textNodes.push(new TextContainer(context, childNode, parent.styles));
41086
- else if (isElementNode(childNode)) if (isSlotElement(childNode) && childNode.assignedNodes) childNode.assignedNodes().forEach(function(childNode) {
41087
- return parseNodeTree(context, childNode, parent, root);
41088
- });
41089
- else {
41090
- var container = createContainer(context, childNode);
41091
- if (container.styles.isVisible()) {
41092
- if (createsRealStackingContext(childNode, container, root)) container.flags |= 4;
41093
- else if (createsStackingContext(container.styles)) container.flags |= 2;
41094
- if (LIST_OWNERS.indexOf(childNode.tagName) !== -1) container.flags |= 8;
41095
- parent.elements.push(container);
41096
- childNode.slot;
41097
- if (childNode.shadowRoot) parseNodeTree(context, childNode.shadowRoot, container, root);
41098
- else if (!isTextareaElement(childNode) && !isSVGElement(childNode) && !isSelectElement(childNode)) parseNodeTree(context, childNode, container, root);
41421
+ else if (isElementNode(childNode)) {
41422
+ if (isSlotElement(childNode) && childNode.assignedNodes) childNode.assignedNodes().forEach(function(childNode) {
41423
+ return parseNodeTree(context, childNode, parent, root);
41424
+ });
41425
+ else {
41426
+ var container = createContainer(context, childNode);
41427
+ if (container.styles.isVisible()) {
41428
+ if (createsRealStackingContext(childNode, container, root)) container.flags |= 4;
41429
+ else if (createsStackingContext(container.styles)) container.flags |= 2;
41430
+ if (LIST_OWNERS.indexOf(childNode.tagName) !== -1) container.flags |= 8;
41431
+ parent.elements.push(container);
41432
+ childNode.slot;
41433
+ if (childNode.shadowRoot) parseNodeTree(context, childNode.shadowRoot, container, root);
41434
+ else if (!isTextareaElement(childNode) && !isSVGElement(childNode) && !isSelectElement(childNode)) parseNodeTree(context, childNode, container, root);
41435
+ }
41099
41436
  }
41100
41437
  }
41101
41438
  }
@@ -41732,14 +42069,16 @@ PERFORMANCE OF THIS SOFTWARE.
41732
42069
  clonedCanvas.height = canvas.height;
41733
42070
  var ctx = canvas.getContext("2d");
41734
42071
  var clonedCtx = clonedCanvas.getContext("2d");
41735
- if (clonedCtx) if (!this.options.allowTaint && ctx) clonedCtx.putImageData(ctx.getImageData(0, 0, canvas.width, canvas.height), 0, 0);
41736
- else {
41737
- var gl = (_a = canvas.getContext("webgl2")) !== null && _a !== void 0 ? _a : canvas.getContext("webgl");
41738
- if (gl) {
41739
- var attribs = gl.getContextAttributes();
41740
- if ((attribs === null || attribs === void 0 ? void 0 : attribs.preserveDrawingBuffer) === false) this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false", canvas);
42072
+ if (clonedCtx) {
42073
+ if (!this.options.allowTaint && ctx) clonedCtx.putImageData(ctx.getImageData(0, 0, canvas.width, canvas.height), 0, 0);
42074
+ else {
42075
+ var gl = (_a = canvas.getContext("webgl2")) !== null && _a !== void 0 ? _a : canvas.getContext("webgl");
42076
+ if (gl) {
42077
+ var attribs = gl.getContextAttributes();
42078
+ if ((attribs === null || attribs === void 0 ? void 0 : attribs.preserveDrawingBuffer) === false) this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false", canvas);
42079
+ }
42080
+ clonedCtx.drawImage(canvas, 0, 0);
41741
42081
  }
41742
- clonedCtx.drawImage(canvas, 0, 0);
41743
42082
  }
41744
42083
  return clonedCanvas;
41745
42084
  } catch (e) {
@@ -42068,18 +42407,19 @@ PERFORMANCE OF THIS SOFTWARE.
42068
42407
  var responseType = FEATURES.SUPPORT_RESPONSE_TYPE ? "blob" : "text";
42069
42408
  var xhr = new XMLHttpRequest();
42070
42409
  xhr.onload = function() {
42071
- if (xhr.status === 200) if (responseType === "text") resolve(xhr.response);
42072
- else {
42073
- var reader_1 = new FileReader();
42074
- reader_1.addEventListener("load", function() {
42075
- return resolve(reader_1.result);
42076
- }, false);
42077
- reader_1.addEventListener("error", function(e) {
42078
- return reject(e);
42079
- }, false);
42080
- reader_1.readAsDataURL(xhr.response);
42081
- }
42082
- else reject("Failed to proxy resource " + key + " with status code " + xhr.status);
42410
+ if (xhr.status === 200) {
42411
+ if (responseType === "text") resolve(xhr.response);
42412
+ else {
42413
+ var reader_1 = new FileReader();
42414
+ reader_1.addEventListener("load", function() {
42415
+ return resolve(reader_1.result);
42416
+ }, false);
42417
+ reader_1.addEventListener("error", function(e) {
42418
+ return reject(e);
42419
+ }, false);
42420
+ reader_1.readAsDataURL(xhr.response);
42421
+ }
42422
+ } else reject("Failed to proxy resource " + key + " with status code " + xhr.status);
42083
42423
  };
42084
42424
  xhr.onerror = reject;
42085
42425
  var queryString = proxy.indexOf("?") > -1 ? "&" : "?";
@@ -42817,9 +43157,7 @@ PERFORMANCE OF THIS SOFTWARE.
42817
43157
  case 2:
42818
43158
  _this.ctx.fillRect(text.bounds.left, Math.round(text.bounds.top), text.bounds.width, 1);
42819
43159
  break;
42820
- case 3:
42821
- _this.ctx.fillRect(text.bounds.left, Math.ceil(text.bounds.top + middle), text.bounds.width, 1);
42822
- break;
43160
+ case 3: _this.ctx.fillRect(text.bounds.left, Math.ceil(text.bounds.top + middle), text.bounds.width, 1);
42823
43161
  }
42824
43162
  });
42825
43163
  }
@@ -42834,7 +43172,6 @@ PERFORMANCE OF THIS SOFTWARE.
42834
43172
  _this.ctx.strokeStyle = "";
42835
43173
  _this.ctx.lineWidth = 0;
42836
43174
  _this.ctx.lineJoin = "miter";
42837
- break;
42838
43175
  }
42839
43176
  });
42840
43177
  });
@@ -42972,9 +43309,7 @@ PERFORMANCE OF THIS SOFTWARE.
42972
43309
  case 1:
42973
43310
  x += bounds.width / 2;
42974
43311
  break;
42975
- case 2:
42976
- x += bounds.width;
42977
- break;
43312
+ case 2: x += bounds.width;
42978
43313
  }
42979
43314
  textBounds = bounds.add(x, 0, 0, -bounds.height / 2 + 1);
42980
43315
  this.ctx.save();
@@ -43489,8 +43824,10 @@ PERFORMANCE OF THIS SOFTWARE.
43489
43824
  maxSpace = (length - (numberOfDashes + 1) * dashLength) / numberOfDashes;
43490
43825
  spaceLength = maxSpace <= 0 || Math.abs(spaceLength - minSpace) < Math.abs(spaceLength - maxSpace) ? minSpace : maxSpace;
43491
43826
  }
43492
- if (useLineDash) if (style === 3) this.ctx.setLineDash([0, dashLength + spaceLength]);
43493
- else this.ctx.setLineDash([dashLength, spaceLength]);
43827
+ if (useLineDash) {
43828
+ if (style === 3) this.ctx.setLineDash([0, dashLength + spaceLength]);
43829
+ else this.ctx.setLineDash([dashLength, spaceLength]);
43830
+ }
43494
43831
  if (style === 3) {
43495
43832
  this.ctx.lineCap = "round";
43496
43833
  this.ctx.lineWidth = width;
@@ -43625,8 +43962,10 @@ PERFORMANCE OF THIS SOFTWARE.
43625
43962
  Logger.prototype.debug = function() {
43626
43963
  var args = [];
43627
43964
  for (var _i = 0; _i < arguments.length; _i++) args[_i] = arguments[_i];
43628
- if (this.enabled) if (typeof window !== "undefined" && window.console && typeof console.debug === "function") console.debug.apply(console, __spreadArray([this.id, this.getTime() + "ms"], args));
43629
- else this.info.apply(this, args);
43965
+ if (this.enabled) {
43966
+ if (typeof window !== "undefined" && window.console && typeof console.debug === "function") console.debug.apply(console, __spreadArray([this.id, this.getTime() + "ms"], args));
43967
+ else this.info.apply(this, args);
43968
+ }
43630
43969
  };
43631
43970
  Logger.prototype.getTime = function() {
43632
43971
  return Date.now() - this.start;
@@ -43641,14 +43980,18 @@ PERFORMANCE OF THIS SOFTWARE.
43641
43980
  Logger.prototype.warn = function() {
43642
43981
  var args = [];
43643
43982
  for (var _i = 0; _i < arguments.length; _i++) args[_i] = arguments[_i];
43644
- if (this.enabled) if (typeof window !== "undefined" && window.console && typeof console.warn === "function") console.warn.apply(console, __spreadArray([this.id, this.getTime() + "ms"], args));
43645
- else this.info.apply(this, args);
43983
+ if (this.enabled) {
43984
+ if (typeof window !== "undefined" && window.console && typeof console.warn === "function") console.warn.apply(console, __spreadArray([this.id, this.getTime() + "ms"], args));
43985
+ else this.info.apply(this, args);
43986
+ }
43646
43987
  };
43647
43988
  Logger.prototype.error = function() {
43648
43989
  var args = [];
43649
43990
  for (var _i = 0; _i < arguments.length; _i++) args[_i] = arguments[_i];
43650
- if (this.enabled) if (typeof window !== "undefined" && window.console && typeof console.error === "function") console.error.apply(console, __spreadArray([this.id, this.getTime() + "ms"], args));
43651
- else this.info.apply(this, args);
43991
+ if (this.enabled) {
43992
+ if (typeof window !== "undefined" && window.console && typeof console.error === "function") console.error.apply(console, __spreadArray([this.id, this.getTime() + "ms"], args));
43993
+ else this.info.apply(this, args);
43994
+ }
43652
43995
  };
43653
43996
  Logger.instances = {};
43654
43997
  return Logger;
@@ -43829,7 +44172,20 @@ var Animation = /*#__PURE__*/ function() {
43829
44172
  return _createClass(Animation, [
43830
44173
  {
43831
44174
  key: "pending",
43832
- get: function get() {
44175
+ get:
44176
+ /**
44177
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Animation/effect
44178
+ */
44179
+ /**
44180
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Animation/timeline
44181
+ */
44182
+ /**
44183
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Animation/id
44184
+ */
44185
+ /**
44186
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Animation/pending
44187
+ */
44188
+ function get() {
43833
44189
  return this._startTime === null && !this._paused && this.playbackRate !== 0 || this.currentTimePending;
43834
44190
  }
43835
44191
  },
@@ -43844,7 +44200,18 @@ var Animation = /*#__PURE__*/ function() {
43844
44200
  },
43845
44201
  {
43846
44202
  key: "ready",
43847
- get: function get() {
44203
+ get:
44204
+ /**
44205
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Animation/ready
44206
+ * @example
44207
+ animation.pause();
44208
+ animation.ready.then(function() {
44209
+ // Displays 'running'
44210
+ alert(animation.playState);
44211
+ });
44212
+ animation.play();
44213
+ */
44214
+ function get() {
43848
44215
  var _this = this;
43849
44216
  if (!this.readyPromise) {
43850
44217
  if (this.timeline.animationsWithPromises.indexOf(this) === -1) this.timeline.animationsWithPromises.push(this);
@@ -44878,8 +45245,10 @@ function normalizeTimingInput(timingInput, forGroup) {
44878
45245
  return makeTiming(timingInput, forGroup);
44879
45246
  }
44880
45247
  function numericTimingToObject(timingInput) {
44881
- if (typeof timingInput === "number") if (isNaN(timingInput)) timingInput = { duration: "auto" };
44882
- else timingInput = { duration: timingInput };
45248
+ if (typeof timingInput === "number") {
45249
+ if (isNaN(timingInput)) timingInput = { duration: "auto" };
45250
+ else timingInput = { duration: timingInput };
45251
+ }
44883
45252
  return timingInput;
44884
45253
  }
44885
45254
  /**
@@ -45188,7 +45557,14 @@ runtime.CameraContribution = /* @__PURE__ */ function(_Camera) {
45188
45557
  return _createClass(AdvancedCamera, [
45189
45558
  {
45190
45559
  key: "rotate",
45191
- value: function rotate(azimuth, elevation, roll) {
45560
+ value:
45561
+ /**
45562
+ * Changes the azimuth and elevation with respect to the current camera axes
45563
+ * @param {Number} azimuth the relative azimuth
45564
+ * @param {Number} elevation the relative elevation
45565
+ * @param {Number} roll the relative roll
45566
+ */
45567
+ function rotate(azimuth, elevation, roll) {
45192
45568
  this.relElevation = getAngle(elevation);
45193
45569
  this.relAzimuth = getAngle(azimuth);
45194
45570
  this.relRoll = getAngle(roll);
@@ -46667,18 +47043,20 @@ function configure_toolbar(gobj) {
46667
47043
  title: (0, i18next.t)("reset zoom")
46668
47044
  }
46669
47045
  ];
46670
- if ((0, _yuneta_gobj_js.gobj_read_bool_attr)(gobj, "with_fullscreen")) if (priv.is_fullscreen) items.push({
46671
- id: "g6-icon-fullscreen-exit",
46672
- value: "exit-fullscreen",
46673
- className: "EV_EXIT_FULLSCREEN",
46674
- title: (0, i18next.t)("exit full screen")
46675
- });
46676
- else items.push({
46677
- id: "g6-icon-fullscreen",
46678
- value: "request-fullscreen",
46679
- className: "EV_REQUEST_FULLSCREEN",
46680
- title: (0, i18next.t)("enter full screen")
46681
- });
47046
+ if ((0, _yuneta_gobj_js.gobj_read_bool_attr)(gobj, "with_fullscreen")) {
47047
+ if (priv.is_fullscreen) items.push({
47048
+ id: "g6-icon-fullscreen-exit",
47049
+ value: "exit-fullscreen",
47050
+ className: "EV_EXIT_FULLSCREEN",
47051
+ title: (0, i18next.t)("exit full screen")
47052
+ });
47053
+ else items.push({
47054
+ id: "g6-icon-fullscreen",
47055
+ value: "request-fullscreen",
47056
+ className: "EV_REQUEST_FULLSCREEN",
47057
+ title: (0, i18next.t)("enter full screen")
47058
+ });
47059
+ }
46682
47060
  return items;
46683
47061
  },
46684
47062
  onClick: (value) => {
@@ -46701,9 +47079,7 @@ function configure_toolbar(gobj) {
46701
47079
  case "request-fullscreen":
46702
47080
  (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_REQUEST_FULLSCREEN", {}, gobj);
46703
47081
  break;
46704
- case "exit-fullscreen":
46705
- (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_EXIT_FULLSCREEN", {}, gobj);
46706
- break;
47082
+ case "exit-fullscreen": (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_EXIT_FULLSCREEN", {}, gobj);
46707
47083
  }
46708
47084
  }
46709
47085
  });
@@ -46774,9 +47150,7 @@ function configure_toolbar_edit(gobj) {
46774
47150
  case "redo":
46775
47151
  (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_HISTORY_REDO", {}, gobj);
46776
47152
  break;
46777
- case "save":
46778
- (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_SAVE_GRAPH", {}, gobj);
46779
- break;
47153
+ case "save": (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_SAVE_GRAPH", {}, gobj);
46780
47154
  }
46781
47155
  }
46782
47156
  });
@@ -46817,9 +47191,7 @@ function configure_behaviour(gobj) {
46817
47191
  case "operation":
46818
47192
  priv.edit_mode = false;
46819
47193
  break;
46820
- default:
46821
- (0, _yuneta_gobj_js.log_error)(`operation mode unknown: ${operation_mode}`);
46822
- break;
47194
+ default: (0, _yuneta_gobj_js.log_error)(`operation mode unknown: ${operation_mode}`);
46823
47195
  }
46824
47196
  if (!priv.edit_mode) deselect_node(gobj);
46825
47197
  graph_write_behaviors(gobj, behaviors);
@@ -46854,9 +47226,7 @@ function calculate_hooks_fkeys_counter(desc) {
46854
47226
  case "hook":
46855
47227
  desc.hooks_counter++;
46856
47228
  break;
46857
- case "fkey":
46858
- desc.fkeys_counter++;
46859
- break;
47229
+ case "fkey": desc.fkeys_counter++;
46860
47230
  }
46861
47231
  }
46862
47232
  if (desc.hooks_counter === 0) desc.node_treedb_type = "child";
@@ -46896,7 +47266,6 @@ function build_ports(gobj, desc) {
46896
47266
  stroke: getStrokeColor(desc.color)
46897
47267
  };
46898
47268
  top_ports.push(port);
46899
- break;
46900
47269
  }
46901
47270
  }
46902
47271
  for (let i = 0; i < top_ports.length; i++) top_ports[i].placement = [.5, 0];
@@ -47091,13 +47460,15 @@ function collect_fkey_refs(desc, record) {
47091
47460
  let col = cols[i];
47092
47461
  if (!col.fkey) continue;
47093
47462
  let fkeys = record[col.id];
47094
- if (fkeys) if ((0, _yuneta_gobj_js.is_array)(fkeys)) for (let j = 0; j < fkeys.length; j++) {
47095
- let key = (0, _yuneta_gobj_js.treedb_encoder_fkey)(col, fkeys[j]);
47096
- if (key) refs.add(i + " " + key);
47097
- }
47098
- else {
47099
- let key = (0, _yuneta_gobj_js.treedb_encoder_fkey)(col, fkeys);
47100
- if (key) refs.add(i + " " + key);
47463
+ if (fkeys) {
47464
+ if ((0, _yuneta_gobj_js.is_array)(fkeys)) for (let j = 0; j < fkeys.length; j++) {
47465
+ let key = (0, _yuneta_gobj_js.treedb_encoder_fkey)(col, fkeys[j]);
47466
+ if (key) refs.add(i + " " + key);
47467
+ }
47468
+ else {
47469
+ let key = (0, _yuneta_gobj_js.treedb_encoder_fkey)(col, fkeys);
47470
+ if (key) refs.add(i + " " + key);
47471
+ }
47101
47472
  }
47102
47473
  }
47103
47474
  return refs;
@@ -47113,8 +47484,10 @@ function draw_links(gobj, desc, record, initial_load) {
47113
47484
  let col = cols[i];
47114
47485
  if (!col.fkey) continue;
47115
47486
  let fkeys = record[col.id];
47116
- if (fkeys) if ((0, _yuneta_gobj_js.is_array)(fkeys)) for (let j = 0; j < fkeys.length; j++) draw_link(gobj, topic_name, record_id, col, fkeys[j], initial_load);
47117
- else draw_link(gobj, topic_name, record_id, col, fkeys, initial_load);
47487
+ if (fkeys) {
47488
+ if ((0, _yuneta_gobj_js.is_array)(fkeys)) for (let j = 0; j < fkeys.length; j++) draw_link(gobj, topic_name, record_id, col, fkeys[j], initial_load);
47489
+ else draw_link(gobj, topic_name, record_id, col, fkeys, initial_load);
47490
+ }
47118
47491
  }
47119
47492
  }
47120
47493
  /************************************************************
@@ -47224,8 +47597,10 @@ function clear_links(gobj, desc, record, verbose) {
47224
47597
  let col = cols[i];
47225
47598
  if (!col.fkey) continue;
47226
47599
  let fkeys = record[col.id];
47227
- if (fkeys) if ((0, _yuneta_gobj_js.is_array)(fkeys)) for (let j = 0; j < fkeys.length; j++) clear_link(gobj, topic_name, record_id, col, fkeys[j], verbose);
47228
- else clear_link(gobj, topic_name, record_id, col, fkeys, verbose);
47600
+ if (fkeys) {
47601
+ if ((0, _yuneta_gobj_js.is_array)(fkeys)) for (let j = 0; j < fkeys.length; j++) clear_link(gobj, topic_name, record_id, col, fkeys[j], verbose);
47602
+ else clear_link(gobj, topic_name, record_id, col, fkeys, verbose);
47603
+ }
47229
47604
  }
47230
47605
  }
47231
47606
  /************************************************************
@@ -47322,7 +47697,7 @@ function save_geometry(gobj) {
47322
47697
  let origin = (0, _yuneta_gobj_js.gobj_read_str_attr)((0, _yuneta_gobj_js.gobj_yuno)(), "node_uuid");
47323
47698
  for (const [topic_name, properties] of Object.entries(priv._graph_properties)) {
47324
47699
  properties.__origin__ = origin;
47325
- (0, _yuneta_gobj_js.gobj_publish_event)(gobj, "EV_UPDATE_NODE", {
47700
+ let kw_update = {
47326
47701
  treedb_name: priv.treedb_name,
47327
47702
  topic_name: "__graphs__",
47328
47703
  record: {
@@ -47336,7 +47711,8 @@ function save_geometry(gobj) {
47336
47711
  autolink: false,
47337
47712
  create: true
47338
47713
  }
47339
- });
47714
+ };
47715
+ (0, _yuneta_gobj_js.gobj_publish_event)(gobj, "EV_UPDATE_NODE", kw_update);
47340
47716
  }
47341
47717
  }
47342
47718
  /************************************************************
@@ -47347,7 +47723,7 @@ function save_topic_graph_properties(gobj, topic_name) {
47347
47723
  let properties = priv._graph_properties[topic_name];
47348
47724
  if (!properties) return;
47349
47725
  properties.__origin__ = (0, _yuneta_gobj_js.gobj_read_str_attr)((0, _yuneta_gobj_js.gobj_yuno)(), "node_uuid");
47350
- (0, _yuneta_gobj_js.gobj_publish_event)(gobj, "EV_UPDATE_NODE", {
47726
+ let kw_update = {
47351
47727
  treedb_name: priv.treedb_name,
47352
47728
  topic_name: "__graphs__",
47353
47729
  record: {
@@ -47361,7 +47737,8 @@ function save_topic_graph_properties(gobj, topic_name) {
47361
47737
  autolink: false,
47362
47738
  create: true
47363
47739
  }
47364
- });
47740
+ };
47741
+ (0, _yuneta_gobj_js.gobj_publish_event)(gobj, "EV_UPDATE_NODE", kw_update);
47365
47742
  }
47366
47743
  /************************************************************
47367
47744
  * Pause/resume history recording.
@@ -47550,19 +47927,17 @@ function graph_add_plugin(gobj, plugin_key, options) {
47550
47927
  }
47551
47928
  plugin = graph_get_plugin(gobj, plugin_key);
47552
47929
  switch (plugin_key) {
47553
- case "history":
47554
- if (plugin) {
47555
- plugin.on(_antv_g6.HistoryEvent.CHANGE, () => {
47556
- update_history_buttons(gobj);
47557
- });
47558
- graph.updatePlugin({
47559
- key: plugin_key,
47560
- beforeAddCommand: () => {
47561
- return !priv._history_paused;
47562
- }
47563
- });
47564
- }
47565
- break;
47930
+ case "history": if (plugin) {
47931
+ plugin.on(_antv_g6.HistoryEvent.CHANGE, () => {
47932
+ update_history_buttons(gobj);
47933
+ });
47934
+ graph.updatePlugin({
47935
+ key: plugin_key,
47936
+ beforeAddCommand: () => {
47937
+ return !priv._history_paused;
47938
+ }
47939
+ });
47940
+ }
47566
47941
  }
47567
47942
  }
47568
47943
  function graph_remove_plugin(gobj, plugin_key) {
@@ -49601,9 +49976,7 @@ function handle_context_menu_click(gobj, value) {
49601
49976
  case "resize_all_ports":
49602
49977
  copy_size_to_ports(gobj, false);
49603
49978
  break;
49604
- case "resize_topic_ports":
49605
- copy_size_to_ports(gobj, true);
49606
- break;
49979
+ case "resize_topic_ports": copy_size_to_ports(gobj, true);
49607
49980
  }
49608
49981
  }
49609
49982
  /************************************************************
@@ -50391,7 +50764,7 @@ function create_gclass$1(gclass_name) {
50391
50764
  null
50392
50765
  ]
50393
50766
  ]]];
50394
- __gclass__$1 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, [
50767
+ const event_types = [
50395
50768
  ["EV_DESCS", 0],
50396
50769
  ["EV_CLEAR_DATA", 0],
50397
50770
  ["EV_LOAD_DATA", 0],
@@ -50428,7 +50801,8 @@ function create_gclass$1(gclass_name) {
50428
50801
  ["EV_HIDE", 0],
50429
50802
  ["EV_RESIZE", 0],
50430
50803
  ["EV_THEME", 0]
50431
- ], states, gmt$1, 0, attrs_table$1, PRIVATE_DATA$1, 0, 0, 0, _yuneta_gobj_js.gclass_flag_t.gcflag_manual_start);
50804
+ ];
50805
+ __gclass__$1 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$1, 0, attrs_table$1, PRIVATE_DATA$1, 0, 0, 0, _yuneta_gobj_js.gclass_flag_t.gcflag_manual_start);
50432
50806
  if (!__gclass__$1) return -1;
50433
50807
  return 0;
50434
50808
  }
@@ -50579,22 +50953,22 @@ var YUI_ROLLING = {
50579
50953
  },
50580
50954
  "6h": {
50581
50955
  id: "6h",
50582
- secs: 6 * 3600,
50956
+ secs: 21600,
50583
50957
  label: "last 6h"
50584
50958
  },
50585
50959
  "24h": {
50586
50960
  id: "24h",
50587
- secs: 24 * 3600,
50961
+ secs: 86400,
50588
50962
  label: "last 24h"
50589
50963
  },
50590
50964
  "7d": {
50591
50965
  id: "7d",
50592
- secs: 168 * 3600,
50966
+ secs: 604800,
50593
50967
  label: "last 7 days"
50594
50968
  },
50595
50969
  "30d": {
50596
50970
  id: "30d",
50597
- secs: 720 * 3600,
50971
+ secs: 2592e3,
50598
50972
  label: "last 30 days"
50599
50973
  }
50600
50974
  };
@@ -51957,7 +52331,8 @@ function ac_set_mode(gobj, event, kw, src) {
51957
52331
  *
51958
52332
  ***************************************************************/
51959
52333
  function ac_prev(gobj, event, kw, src) {
51960
- (0, _yuneta_gobj_js.gobj_write_attr)(gobj, "anchor", period_shift(cur_mode(gobj).spec, (0, _yuneta_gobj_js.gobj_read_integer_attr)(gobj, "anchor"), -1));
52334
+ let mode = cur_mode(gobj);
52335
+ (0, _yuneta_gobj_js.gobj_write_attr)(gobj, "anchor", period_shift(mode.spec, (0, _yuneta_gobj_js.gobj_read_integer_attr)(gobj, "anchor"), -1));
51961
52336
  close_calendar(gobj);
51962
52337
  repaint(gobj);
51963
52338
  publish_period(gobj);
@@ -51967,7 +52342,8 @@ function ac_prev(gobj, event, kw, src) {
51967
52342
  *
51968
52343
  ***************************************************************/
51969
52344
  function ac_next(gobj, event, kw, src) {
51970
- (0, _yuneta_gobj_js.gobj_write_attr)(gobj, "anchor", period_shift(cur_mode(gobj).spec, (0, _yuneta_gobj_js.gobj_read_integer_attr)(gobj, "anchor"), 1));
52345
+ let mode = cur_mode(gobj);
52346
+ (0, _yuneta_gobj_js.gobj_write_attr)(gobj, "anchor", period_shift(mode.spec, (0, _yuneta_gobj_js.gobj_read_integer_attr)(gobj, "anchor"), 1));
51971
52347
  close_calendar(gobj);
51972
52348
  repaint(gobj);
51973
52349
  publish_period(gobj);
@@ -52145,7 +52521,7 @@ function create_gclass(gclass_name) {
52145
52521
  null
52146
52522
  ]
52147
52523
  ]]];
52148
- __gclass__ = (0, _yuneta_gobj_js.gclass_create)(gclass_name, [
52524
+ const event_types = [
52149
52525
  ["EV_SET_MODE", 0],
52150
52526
  ["EV_PREV", 0],
52151
52527
  ["EV_NEXT", 0],
@@ -52156,7 +52532,8 @@ function create_gclass(gclass_name) {
52156
52532
  ["EV_REFRESH", 0],
52157
52533
  ["EV_LANGUAGE_CHANGED", 0],
52158
52534
  ["EV_PERIOD_CHANGED", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT]
52159
- ], states, gmt, 0, attrs_table, PRIVATE_DATA, 0, 0, 0, 0);
52535
+ ];
52536
+ __gclass__ = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt, 0, attrs_table, PRIVATE_DATA, 0, 0, 0, 0);
52160
52537
  if (!__gclass__) return -1;
52161
52538
  return 0;
52162
52539
  }
@@ -52256,8 +52633,8 @@ function traffic_now() {
52256
52633
  function traffic_size(n) {
52257
52634
  n = Number(n) || 0;
52258
52635
  if (n < 1024) return n + " B";
52259
- if (n < 1024 * 1024) return (n / 1024).toFixed(1) + " KB";
52260
- return (n / (1024 * 1024)).toFixed(1) + " MB";
52636
+ if (n < 1048576) return (n / 1024).toFixed(1) + " KB";
52637
+ return (n / 1048576).toFixed(1) + " MB";
52261
52638
  }
52262
52639
  /************************************************************
52263
52640
  * Seconds-since-epoch → ISO string, or null if not a plausible
@@ -52340,7 +52717,8 @@ function set_output_route(v) {
52340
52717
  refresh_dev_chrome();
52341
52718
  }
52342
52719
  function toggle_pref(key, def) {
52343
- (0, _yuneta_gobj_js.kw_set_local_storage_value)(key, dev_num(key, def) ? 0 : 1);
52720
+ let v = dev_num(key, def) ? 0 : 1;
52721
+ (0, _yuneta_gobj_js.kw_set_local_storage_value)(key, v);
52344
52722
  rerender_all();
52345
52723
  refresh_dev_chrome();
52346
52724
  }
@@ -53600,7 +53978,7 @@ function apply_dev_traces() {
53600
53978
  function setup_dev(self, show) {
53601
53979
  if (show) {
53602
53980
  ensure_dev_style();
53603
- (0, _yuneta_gobj_js.gobj_start)((0, _yuneta_gobj_js.gobj_create_service)("Developer-Window", "C_YUI_WINDOW", {
53981
+ let win = (0, _yuneta_gobj_js.gobj_create_service)("Developer-Window", "C_YUI_WINDOW", {
53604
53982
  $parent: document.getElementById("top-layer") || null,
53605
53983
  subscriber: null,
53606
53984
  showMax: true,
@@ -53617,7 +53995,8 @@ function setup_dev(self, show) {
53617
53995
  on_close: function() {
53618
53996
  (0, _yuneta_gobj_js.kw_set_local_storage_value)("open_developer_window", 0);
53619
53997
  }
53620
- }, self));
53998
+ }, self);
53999
+ (0, _yuneta_gobj_js.gobj_start)(win);
53621
54000
  (0, _yuneta_gobj_js.kw_set_local_storage_value)("open_developer_window", 1);
53622
54001
  setTimeout(() => {
53623
54002
  refresh_dev_chrome();
@@ -53721,7 +54100,8 @@ function setup_frontend_view(self) {
53721
54100
  (0, _yuneta_gobj_js.log_error)("yui_frontend_view: cannot create the frontend-view window");
53722
54101
  return null;
53723
54102
  }
53724
- let $tree = (0, _yuneta_gobj_js.gobj_read_attr)((0, _yuneta_gobj_js.gobj_create_pure_child)("frontend_view_tree", "C_YUI_GOBJ_TREE_JS", {}, win), "$container");
54103
+ let tree = (0, _yuneta_gobj_js.gobj_create_pure_child)("frontend_view_tree", "C_YUI_GOBJ_TREE_JS", {}, win);
54104
+ let $tree = (0, _yuneta_gobj_js.gobj_read_attr)(tree, "$container");
53725
54105
  if (!$tree) {
53726
54106
  (0, _yuneta_gobj_js.log_error)("yui_frontend_view: C_YUI_GOBJ_TREE_JS without $container");
53727
54107
  return win;
@@ -53796,6 +54176,7 @@ exports.yui_is_dark = yui_is_dark;
53796
54176
  exports.yui_mount_service_view = yui_mount_service_view;
53797
54177
  exports.yui_shell_close_drawer = yui_shell_close_drawer;
53798
54178
  exports.yui_shell_close_dropdown = yui_shell_close_dropdown;
54179
+ exports.yui_shell_confirm_danger = yui_shell_confirm_danger;
53799
54180
  exports.yui_shell_confirm_ok = yui_shell_confirm_ok;
53800
54181
  exports.yui_shell_confirm_yesno = yui_shell_confirm_yesno;
53801
54182
  exports.yui_shell_confirm_yesnocancel = yui_shell_confirm_yesnocancel;