bpmn-js 17.1.0 → 17.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * bpmn-js - bpmn-modeler v17.1.0
2
+ * bpmn-js - bpmn-modeler v17.2.1
3
3
  *
4
4
  * Copyright (c) 2014-present, camunda Services GmbH
5
5
  *
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * Source Code: https://github.com/bpmn-io/bpmn-js
10
10
  *
11
- * Date: 2024-03-18
11
+ * Date: 2024-03-22
12
12
  */
13
13
  (function (global, factory) {
14
14
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -2288,16 +2288,19 @@
2288
2288
  * @typedef { import('./index.js').ModuleDeclaration } ModuleDeclaration
2289
2289
  * @typedef { import('./index.js').ModuleDefinition } ModuleDefinition
2290
2290
  * @typedef { import('./index.js').InjectorContext } InjectorContext
2291
+ *
2292
+ * @typedef { import('./index.js').TypedDeclaration<any, any> } TypedDeclaration
2291
2293
  */
2292
2294
 
2293
2295
  /**
2294
2296
  * Create a new injector with the given modules.
2295
2297
  *
2296
2298
  * @param {ModuleDefinition[]} modules
2297
- * @param {InjectorContext} [parent]
2299
+ * @param {InjectorContext} [_parent]
2298
2300
  */
2299
- function Injector(modules, parent) {
2300
- parent = parent || {
2301
+ function Injector(modules, _parent) {
2302
+
2303
+ const parent = _parent || /** @type InjectorContext */ ({
2301
2304
  get: function(name, strict) {
2302
2305
  currentlyResolving.push(name);
2303
2306
 
@@ -2307,7 +2310,7 @@
2307
2310
  throw error(`No provider for "${ name }"!`);
2308
2311
  }
2309
2312
  }
2310
- };
2313
+ });
2311
2314
 
2312
2315
  const currentlyResolving = [];
2313
2316
  const providers = this._providers = Object.create(parent._providers || null);
@@ -2330,12 +2333,13 @@
2330
2333
  * @return {any}
2331
2334
  */
2332
2335
  function get(name, strict) {
2333
- if (!providers[name] && name.indexOf('.') !== -1) {
2336
+ if (!providers[name] && name.includes('.')) {
2337
+
2334
2338
  const parts = name.split('.');
2335
- let pivot = get(parts.shift());
2339
+ let pivot = get(/** @type { string } */ (parts.shift()));
2336
2340
 
2337
2341
  while (parts.length) {
2338
- pivot = pivot[parts.shift()];
2342
+ pivot = pivot[/** @type { string } */ (parts.shift())];
2339
2343
  }
2340
2344
 
2341
2345
  return pivot;
@@ -2375,6 +2379,9 @@
2375
2379
  }
2376
2380
  }
2377
2381
 
2382
+ /**
2383
+ * @type {string[]}
2384
+ */
2378
2385
  const inject = fn.$inject || parseAnnotations(fn);
2379
2386
  const dependencies = inject.map(dep => {
2380
2387
  if (hasOwnProp(locals, dep)) {
@@ -2386,7 +2393,7 @@
2386
2393
 
2387
2394
  return {
2388
2395
  fn: fn,
2389
- dependencies: dependencies
2396
+ dependencies
2390
2397
  };
2391
2398
  }
2392
2399
 
@@ -2406,7 +2413,7 @@
2406
2413
  } = fnDef(type);
2407
2414
 
2408
2415
  // instantiate var args constructor
2409
- const Constructor = Function.prototype.bind.apply(fn, [ null ].concat(dependencies));
2416
+ const Constructor = Function.prototype.bind.call(fn, null, ...dependencies);
2410
2417
 
2411
2418
  return new Constructor();
2412
2419
  }
@@ -2586,13 +2593,17 @@
2586
2593
  return;
2587
2594
  }
2588
2595
 
2589
- if (moduleDefinition[key][2] === 'private') {
2590
- providers[key] = moduleDefinition[key];
2596
+ const typeDeclaration = /** @type { TypedDeclaration } */ (
2597
+ moduleDefinition[key]
2598
+ );
2599
+
2600
+ if (typeDeclaration[2] === 'private') {
2601
+ providers[key] = typeDeclaration;
2591
2602
  return;
2592
2603
  }
2593
2604
 
2594
- const type = moduleDefinition[key][0];
2595
- const value = moduleDefinition[key][1];
2605
+ const type = typeDeclaration[0];
2606
+ const value = typeDeclaration[1];
2596
2607
 
2597
2608
  providers[key] = [ factoryMap[type], arrayUnwrap(type, value), type ];
2598
2609
  });
@@ -4653,7 +4664,7 @@
4653
4664
  * @typedef {import('../core/Types').ConnectionLike} Connection
4654
4665
  *
4655
4666
  * @typedef {import('../util/Types').DirectionTRBL} DirectionTRBL
4656
- * @typedef {import('../util/Types').Intersect} Intersect
4667
+ * @typedef {import('../util/Types').Intersection} Intersection
4657
4668
  * @typedef {import('../util/Types').Point} Point
4658
4669
  * @typedef {import('../util/Types').Rect} Rect
4659
4670
  * @typedef {import('../util/Types').RectTRBL} RectTRBL
@@ -4823,7 +4834,7 @@
4823
4834
  * @param {Rect} reference
4824
4835
  * @param {Point|number} padding
4825
4836
  *
4826
- * @return {DirectionTRBL|Intersect} the orientation; one of top, top-left, left, ..., bottom, right or intersect.
4837
+ * @return {DirectionTRBL|Intersection} the orientation; one of top, top-left, left, ..., bottom, right or intersect.
4827
4838
  */
4828
4839
  function getOrientation(rect, reference, padding) {
4829
4840
 
@@ -4981,6 +4992,7 @@
4981
4992
  * @typedef {import('../util/Types').Point} Point
4982
4993
  * @typedef {import('../util/Types').Rect} Rect
4983
4994
  * @typedef {import('../util/Types').RectTRBL} RectTRBL
4995
+ * @typedef {import('../util/Types').ScrollDelta} ScrollDelta
4984
4996
  */
4985
4997
 
4986
4998
  function round$c(number, resolution) {
@@ -5681,7 +5693,7 @@
5681
5693
  Canvas.prototype.setRootElement = function(rootElement) {
5682
5694
 
5683
5695
  if (rootElement === this._rootElement) {
5684
- return;
5696
+ return rootElement;
5685
5697
  }
5686
5698
 
5687
5699
  let plane;
@@ -6116,7 +6128,7 @@
6116
6128
  /**
6117
6129
  * Gets or sets the scroll of the canvas.
6118
6130
  *
6119
- * @param {Point} [delta] The scroll to be set.
6131
+ * @param {ScrollDelta} [delta] The scroll to be set.
6120
6132
  *
6121
6133
  * @return {Point}
6122
6134
  */
@@ -7498,6 +7510,8 @@
7498
7510
  * var sum = eventBus.fire('sum', 1, 2);
7499
7511
  * console.log(sum); // 3
7500
7512
  * ```
7513
+ *
7514
+ * @template [EventMap=null]
7501
7515
  */
7502
7516
  function EventBus() {
7503
7517
 
@@ -7511,8 +7525,9 @@
7511
7525
  this.on('diagram.destroy', 1, this._destroy, this);
7512
7526
  }
7513
7527
 
7514
-
7515
7528
  /**
7529
+ * @overlord
7530
+ *
7516
7531
  * Register an event listener for events with the given name.
7517
7532
  *
7518
7533
  * The callback will be invoked with `event, ...additionalArguments`
@@ -7531,6 +7546,25 @@
7531
7546
  * @param {EventBusEventCallback<T>} callback
7532
7547
  * @param {any} [that] callback context
7533
7548
  */
7549
+ /**
7550
+ * Register an event listener for events with the given name.
7551
+ *
7552
+ * The callback will be invoked with `event, ...additionalArguments`
7553
+ * that have been passed to {@link EventBus#fire}.
7554
+ *
7555
+ * Returning false from a listener will prevent the events default action
7556
+ * (if any is specified). To stop an event from being processed further in
7557
+ * other listeners execute {@link Event#stopPropagation}.
7558
+ *
7559
+ * Returning anything but `undefined` from a listener will stop the listener propagation.
7560
+ *
7561
+ * @template {keyof EventMap} EventName
7562
+ *
7563
+ * @param {EventName} events to subscribe to
7564
+ * @param {number} [priority=1000] listen priority
7565
+ * @param {EventBusEventCallback<EventMap[EventName]>} callback
7566
+ * @param {any} [that] callback context
7567
+ */
7534
7568
  EventBus.prototype.on = function(events, priority, callback, that) {
7535
7569
 
7536
7570
  events = isArray$3(events) ? events : [ events ];
@@ -7568,6 +7602,8 @@
7568
7602
  };
7569
7603
 
7570
7604
  /**
7605
+ * @overlord
7606
+ *
7571
7607
  * Register an event listener that is called only once.
7572
7608
  *
7573
7609
  * @template T
@@ -7577,6 +7613,16 @@
7577
7613
  * @param {EventBusEventCallback<T>} callback
7578
7614
  * @param {any} [that] callback context
7579
7615
  */
7616
+ /**
7617
+ * Register an event listener that is called only once.
7618
+ *
7619
+ * @template {keyof EventMap} EventName
7620
+ *
7621
+ * @param {EventName} events to subscribe to
7622
+ * @param {number} [priority=1000] listen priority
7623
+ * @param {EventBusEventCallback<EventMap[EventName]>} callback
7624
+ * @param {any} [that] callback context
7625
+ */
7580
7626
  EventBus.prototype.once = function(events, priority, callback, that) {
7581
7627
  var self = this;
7582
7628
 
@@ -8014,7 +8060,7 @@
8014
8060
  * @param {number} x
8015
8061
  * @param {number} y
8016
8062
  */
8017
- function translate$2(gfx, x, y) {
8063
+ function translate$1(gfx, x, y) {
8018
8064
  var translate = createTransform();
8019
8065
  translate.setTranslate(x, y);
8020
8066
 
@@ -8283,9 +8329,8 @@
8283
8329
  this.drawShape(visual, element);
8284
8330
 
8285
8331
  // update positioning
8286
- translate$2(gfx, element.x, element.y);
8287
- } else
8288
- if (type === 'connection') {
8332
+ translate$1(gfx, element.x, element.y);
8333
+ } else if (type === 'connection') {
8289
8334
  this.drawConnection(visual, element);
8290
8335
  } else {
8291
8336
  throw new Error('unknown type: ' + type);
@@ -8348,6 +8393,16 @@
8348
8393
  * } & Record<string, any> } DiagramOptions
8349
8394
  */
8350
8395
 
8396
+ /**
8397
+ * @template T
8398
+ * @typedef {import('didi').FactoryFunction<T>} FactoryFunction
8399
+ */
8400
+
8401
+ /**
8402
+ * @template T
8403
+ * @typedef {import('didi').ArrayFunc<T>} ArrayFunc
8404
+ */
8405
+
8351
8406
  /**
8352
8407
  * Bootstrap an injector from a list of modules, instantiating a number of default components
8353
8408
  *
@@ -8366,9 +8421,10 @@
8366
8421
  /**
8367
8422
  * Creates an injector from passed options.
8368
8423
  *
8424
+ * @template ServiceMap
8369
8425
  * @param {DiagramOptions} [options]
8370
8426
  *
8371
- * @return {Injector}
8427
+ * @return {Injector<ServiceMap>}
8372
8428
  */
8373
8429
  function createInjector(options) {
8374
8430
 
@@ -8395,6 +8451,7 @@
8395
8451
  *
8396
8452
  * @class
8397
8453
  * @constructor
8454
+ * @template [ServiceMap=null]
8398
8455
  *
8399
8456
  * @example Creating a plug-in that logs whenever a shape is added to the canvas.
8400
8457
  *
@@ -8433,44 +8490,17 @@
8433
8490
  * ```
8434
8491
  *
8435
8492
  * @param {DiagramOptions} [options]
8436
- * @param {Injector} [injector] An (optional) injector to bootstrap the diagram with.
8493
+ * @param {Injector<ServiceMap>} [injector] An (optional) injector to bootstrap the diagram with.
8437
8494
  */
8438
8495
  function Diagram(options, injector) {
8439
8496
 
8440
- this._injector = injector = injector || createInjector(options);
8441
-
8442
- // API
8443
-
8444
8497
  /**
8445
- * Resolves a diagram service.
8446
- *
8447
- * @template T
8448
- *
8449
- * @param {string} name The name of the service to get.
8450
- * @param {boolean} [strict=true] If false, resolve missing services to null.
8451
- *
8452
- * @return {T|null}
8498
+ * @type {Injector<ServiceMap>}
8453
8499
  */
8454
- this.get = injector.get;
8455
-
8456
- /**
8457
- * Executes a function with its dependencies injected.
8458
- *
8459
- * @template T
8460
- *
8461
- * @param {Function} func function to be invoked
8462
- * @param {InjectionContext} [context] context of the invocation
8463
- * @param {LocalsMap} [locals] locals provided
8464
- *
8465
- * @return {T|null}
8466
- */
8467
- this.invoke = injector.invoke;
8500
+ this._injector = injector || createInjector(options);
8468
8501
 
8469
8502
  // init
8470
8503
 
8471
- // indicate via event
8472
-
8473
-
8474
8504
  /**
8475
8505
  * An event indicating that all plug-ins are loaded.
8476
8506
  *
@@ -8493,6 +8523,82 @@
8493
8523
  this.get('eventBus').fire('diagram.init');
8494
8524
  }
8495
8525
 
8526
+ /**
8527
+ * @overlord
8528
+ *
8529
+ * Resolves a diagram service.
8530
+ *
8531
+ * @template T
8532
+ *
8533
+ * @param {string} name The name of the service to get.
8534
+ *
8535
+ * @return {T}
8536
+ */
8537
+ /**
8538
+ * @overlord
8539
+ *
8540
+ * Resolves a diagram service.
8541
+ *
8542
+ * @template T
8543
+ *
8544
+ * @param {string} name The name of the service to get.
8545
+ * @param {true} strict If false, resolve missing services to null.
8546
+ *
8547
+ * @return {T}
8548
+ */
8549
+ /**
8550
+ * @overlord
8551
+ *
8552
+ * Resolves a diagram service.
8553
+ *
8554
+ * @template T
8555
+ *
8556
+ * @param {string} name The name of the service to get.
8557
+ * @param {boolean} strict If false, resolve missing services to null.
8558
+ *
8559
+ * @return {T|null}
8560
+ */
8561
+ /**
8562
+ * Resolves a diagram service.
8563
+ *
8564
+ * @template {keyof ServiceMap} Name
8565
+ *
8566
+ * @param {Name} name The name of the service to get.
8567
+ *
8568
+ * @return {ServiceMap[Name]}
8569
+ */
8570
+ Diagram.prototype.get = function(name, strict) {
8571
+ return this._injector.get(name, strict);
8572
+ };
8573
+
8574
+ /**
8575
+ * @overlord
8576
+ *
8577
+ * Invoke the given function, injecting dependencies. Return the result.
8578
+ *
8579
+ * @template T
8580
+ *
8581
+ * @param {FactoryFunction<T>} func
8582
+ * @param {InjectionContext} [context]
8583
+ * @param {LocalsMap} [locals]
8584
+ *
8585
+ * @return {T}
8586
+ */
8587
+ /**
8588
+ * Invoke the given function, injecting dependencies provided in
8589
+ * array notation. Return the result.
8590
+ *
8591
+ * @template T
8592
+ *
8593
+ * @param {ArrayFunc<T>} func function to be invoked
8594
+ * @param {InjectionContext} [context] context of the invocation
8595
+ * @param {LocalsMap} [locals] locals provided
8596
+ *
8597
+ * @return {T}
8598
+ */
8599
+ Diagram.prototype.invoke = function(func, context, locals) {
8600
+ return this._injector.invoke(func, context, locals);
8601
+ };
8496
8602
 
8497
8603
  /**
8498
8604
  * Destroys the diagram
@@ -19150,7 +19256,7 @@
19150
19256
  stroke: getStrokeColor$1(element, defaultStrokeColor, attrs.stroke)
19151
19257
  });
19152
19258
 
19153
- translate$2(markerRect, element.width / 2 - 7.5, element.height - 20);
19259
+ translate$1(markerRect, element.width / 2 - 7.5, element.height - 20);
19154
19260
 
19155
19261
  var markerPath = pathMap.getScaledPath('MARKER_SUB_PROCESS', {
19156
19262
  xScaleFactor: 1.5,
@@ -20682,8 +20788,8 @@
20682
20788
  * @typedef { number | Partial<Padding> } PaddingConfig
20683
20789
  *
20684
20790
  * @typedef { {
20685
- * horizontal: 'center' | 'left';
20686
- * vertical: 'top' | 'center';
20791
+ * horizontal: 'center' | 'left' | 'right';
20792
+ * vertical: 'top' | 'middle';
20687
20793
  * } } Alignment
20688
20794
  *
20689
20795
  * @typedef { 'center-middle' | 'center-top' } AlignmentConfig
@@ -20947,7 +21053,7 @@
20947
21053
  /**
20948
21054
  * Creates a new label utility
20949
21055
  *
20950
- * @param {TextConfig} config
21056
+ * @param {TextConfig} [config]
20951
21057
  */
20952
21058
  function Text(config) {
20953
21059
 
@@ -21749,7 +21855,7 @@
21749
21855
  *
21750
21856
  * @return {string} the translated string
21751
21857
  */
21752
- function translate$1(template, replacements) {
21858
+ function translate(template, replacements) {
21753
21859
 
21754
21860
  replacements = replacements || {};
21755
21861
 
@@ -21761,8 +21867,8 @@
21761
21867
  /**
21762
21868
  * @type { import('didi').ModuleDeclaration }
21763
21869
  */
21764
- var translate = {
21765
- translate: [ 'value', translate$1 ]
21870
+ var TranslateModule = {
21871
+ translate: [ 'value', translate ]
21766
21872
  };
21767
21873
 
21768
21874
  /**
@@ -22119,7 +22225,7 @@
22119
22225
 
22120
22226
  var ImportModule = {
22121
22227
  __depends__: [
22122
- translate
22228
+ TranslateModule
22123
22229
  ],
22124
22230
  bpmnImporter: [ 'type', BpmnImporter ]
22125
22231
  };
@@ -22191,7 +22297,7 @@
22191
22297
  *
22192
22298
  * @return {boolean}
22193
22299
  */
22194
- function isButton(event, button) {
22300
+ function isButton$1(event, button) {
22195
22301
  return (getOriginal$1(event) || event).button === button;
22196
22302
  }
22197
22303
 
@@ -22203,7 +22309,7 @@
22203
22309
  function isPrimaryButton(event) {
22204
22310
 
22205
22311
  // button === 0 -> left áka primary mouse button
22206
- return isButton(event, 0);
22312
+ return isButton$1(event, 0);
22207
22313
  }
22208
22314
 
22209
22315
  /**
@@ -22214,7 +22320,7 @@
22214
22320
  function isAuxiliaryButton(event) {
22215
22321
 
22216
22322
  // button === 1 -> auxiliary áka wheel button
22217
- return isButton(event, 1);
22323
+ return isButton$1(event, 1);
22218
22324
  }
22219
22325
 
22220
22326
  /**
@@ -22756,6 +22862,7 @@
22756
22862
  /**
22757
22863
  * @typedef {import('../../model/Types').Element} Element
22758
22864
  *
22865
+ * @typedef {import('./OutlineProvider').default} OutlineProvider
22759
22866
  * @typedef {import('../../core/EventBus').default} EventBus
22760
22867
  * @typedef {import('../../draw/Styles').default} Styles
22761
22868
  */
@@ -22914,7 +23021,7 @@
22914
23021
  * Returns the outline for an element.
22915
23022
  *
22916
23023
  * @param {Element} element
22917
- **/
23024
+ */
22918
23025
  Outline.prototype.getOutline = function(element) {
22919
23026
  var outline;
22920
23027
  var providers = this._getProviders();
@@ -23495,7 +23602,7 @@
23495
23602
  }, config && config.defaults);
23496
23603
 
23497
23604
  /**
23498
- * @type {Map<string, Overlay>}
23605
+ * @type {Record<string, Overlay>}
23499
23606
  */
23500
23607
  this._overlays = {};
23501
23608
 
@@ -23564,8 +23671,7 @@
23564
23671
  } else {
23565
23672
  return [];
23566
23673
  }
23567
- } else
23568
- if (search.type) {
23674
+ } else if (search.type) {
23569
23675
  return filter(this._overlays, matchPattern({ type: search.type }));
23570
23676
  } else {
23571
23677
 
@@ -25314,7 +25420,7 @@
25314
25420
  // modules the viewer is composed of
25315
25421
  Viewer.prototype._modules = [
25316
25422
  CoreModule,
25317
- translate,
25423
+ TranslateModule,
25318
25424
  SelectionModule,
25319
25425
  OverlaysModule,
25320
25426
  DrilldownModdule
@@ -25508,7 +25614,11 @@
25508
25614
  return true;
25509
25615
  }
25510
25616
 
25511
- return isInput(event.target) && this._isModifiedKeyIgnored(event);
25617
+ return (
25618
+ isInput(event.target) || (
25619
+ isButton(event.target) && isKey([ ' ', 'Enter' ], event)
25620
+ )
25621
+ ) && this._isModifiedKeyIgnored(event);
25512
25622
  };
25513
25623
 
25514
25624
  Keyboard.prototype._isModifiedKeyIgnored = function(event) {
@@ -25619,6 +25729,10 @@
25619
25729
  return target && (matches(target, 'input, textarea') || target.contentEditable === 'true');
25620
25730
  }
25621
25731
 
25732
+ function isButton(target) {
25733
+ return target && matches(target, 'button, input[type=submit], input[type=button], a[href], [aria-role=button]');
25734
+ }
25735
+
25622
25736
  var LOW_PRIORITY$m = 500;
25623
25737
 
25624
25738
 
@@ -25949,7 +26063,7 @@
25949
26063
  }
25950
26064
 
25951
26065
  /**
25952
- * @typedef {import('../core/EventBus').EventBus} EventBus
26066
+ * @typedef {import('../core/EventBus').default} EventBus
25953
26067
  */
25954
26068
 
25955
26069
  var TRAP_PRIORITY = 5000;
@@ -26174,6 +26288,7 @@
26174
26288
  * @typedef {import('../../core/EventBus').default} EventBus
26175
26289
  *
26176
26290
  * @typedef {import('../../util/Types').Point} Point
26291
+ * @typedef {import('../../util/Types').ScrollDelta} ScrollDelta
26177
26292
  */
26178
26293
 
26179
26294
  var sign = Math.sign || function(n) {
@@ -26228,7 +26343,7 @@
26228
26343
  ];
26229
26344
 
26230
26345
  /**
26231
- * @param {Point} delta
26346
+ * @param {ScrollDelta} delta
26232
26347
  */
26233
26348
  ZoomScroll.prototype.scroll = function scroll(delta) {
26234
26349
  this._canvas.scroll(delta);
@@ -26328,7 +26443,7 @@
26328
26443
  * Zoom with fixed step size.
26329
26444
  *
26330
26445
  * @param {number} delta Zoom delta (1 for zooming in, -1 for zooming out).
26331
- * @param {Point} position
26446
+ * @param {Point} [position]
26332
26447
  */
26333
26448
  ZoomScroll.prototype.stepZoom = function stepZoom(delta, position) {
26334
26449
 
@@ -26342,7 +26457,7 @@
26342
26457
  * Zoom in/out given a step size.
26343
26458
  *
26344
26459
  * @param {number} delta
26345
- * @param {Point} position
26460
+ * @param {Point} [position]
26346
26461
  * @param {number} stepSize
26347
26462
  */
26348
26463
  ZoomScroll.prototype._zoom = function(delta, position, stepSize) {
@@ -27129,7 +27244,7 @@
27129
27244
  *
27130
27245
  * @param {ContextPadTarget} target
27131
27246
  *
27132
- * @return {Rect}
27247
+ * @return {{ position: { left: number; top: number; }}}
27133
27248
  */
27134
27249
  ContextPad.prototype._getPosition = function(target) {
27135
27250
 
@@ -27184,15 +27299,15 @@
27184
27299
  contextPad: [ 'type', ContextPad ]
27185
27300
  };
27186
27301
 
27187
- var n$1,l$1,u$1,i$1,o$1,r$2,f$1,c$1={},s$1=[],a$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,v$1=Array.isArray;function h$1(n,l){for(var u in l)n[u]=l[u];return n}function p$1(n){var l=n.parentNode;l&&l.removeChild(n);}function y$1(l,u,t){var i,o,r,f={};for(r in u)"key"==r?i=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n$1.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return d$1(l,f,i,o,null)}function d$1(n,t,i,o,r){var f={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++u$1:r};return null==r&&null!=l$1.vnode&&l$1.vnode(f),f}function k$1(n){return n.children}function b$1(n,l){this.props=n,this.context=l;}function g$1(n,l){if(null==l)return n.__?g$1(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__d||u.__e;return "function"==typeof n.type?g$1(n):null}function m$2(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return m$2(n)}}function w$1(n){(!n.__d&&(n.__d=!0)&&i$1.push(n)&&!x.__r++||o$1!==l$1.debounceRendering)&&((o$1=l$1.debounceRendering)||r$2)(x);}function x(){var n,l,u,t,o,r,e,c,s;for(i$1.sort(f$1);n=i$1.shift();)n.__d&&(l=i$1.length,t=void 0,o=void 0,r=void 0,c=(e=(u=n).__v).__e,(s=u.__P)&&(t=[],o=[],(r=h$1({},e)).__v=e.__v+1,z$1(s,e,r,u.__n,void 0!==s.ownerSVGElement,null!=e.__h?[c]:null,t,null==c?g$1(e):c,e.__h,o),L(t,e,o),e.__e!=c&&m$2(e)),i$1.length>l&&i$1.sort(f$1));x.__r=0;}function P(n,l,u,t,i,o,r,f,e,a,h){var p,y,_,b,m,w,x,P,C,D=0,H=t&&t.__k||s$1,I=H.length,T=I,j=l.length;for(u.__k=[],p=0;p<j;p++)null!=(b=u.__k[p]=null==(b=l[p])||"boolean"==typeof b||"function"==typeof b?null:"string"==typeof b||"number"==typeof b||"bigint"==typeof b?d$1(null,b,null,null,b):v$1(b)?d$1(k$1,{children:b},null,null,null):b.__b>0?d$1(b.type,b.props,b.key,b.ref?b.ref:null,b.__v):b)?(b.__=u,b.__b=u.__b+1,-1===(P=A(b,H,x=p+D,T))?_=c$1:(_=H[P]||c$1,H[P]=void 0,T--),z$1(n,b,_,i,o,r,f,e,a,h),m=b.__e,(y=b.ref)&&_.ref!=y&&(_.ref&&N(_.ref,null,b),h.push(y,b.__c||m,b)),null!=m&&(null==w&&(w=m),(C=_===c$1||null===_.__v)?-1==P&&D--:P!==x&&(P===x+1?D++:P>x?T>j-x?D+=P-x:D--:D=P<x&&P==x-1?P-x:0),x=p+D,"function"!=typeof b.type||P===x&&_.__k!==b.__k?"function"==typeof b.type||P===x&&!C?void 0!==b.__d?(e=b.__d,b.__d=void 0):e=m.nextSibling:e=S(n,m,e):e=$(b,e,n),"function"==typeof u.type&&(u.__d=e))):(_=H[p])&&null==_.key&&_.__e&&(_.__e==e&&(_.__=t,e=g$1(_)),O(_,_,!1),H[p]=null);for(u.__e=w,p=I;p--;)null!=H[p]&&("function"==typeof u.type&&null!=H[p].__e&&H[p].__e==u.__d&&(u.__d=H[p].__e.nextSibling),O(H[p],H[p]));}function $(n,l,u){for(var t,i=n.__k,o=0;i&&o<i.length;o++)(t=i[o])&&(t.__=n,l="function"==typeof t.type?$(t,l,u):S(u,t.__e,l));return l}function S(n,l,u){return null==u||u.parentNode!==n?n.insertBefore(l,null):l==u&&null!=l.parentNode||n.insertBefore(l,u),l.nextSibling}function A(n,l,u,t){var i=n.key,o=n.type,r=u-1,f=u+1,e=l[u];if(null===e||e&&i==e.key&&o===e.type)return u;if(t>(null!=e?1:0))for(;r>=0||f<l.length;){if(r>=0){if((e=l[r])&&i==e.key&&o===e.type)return r;r--;}if(f<l.length){if((e=l[f])&&i==e.key&&o===e.type)return f;f++;}}return -1}function D(n,l,u,t,i){var o;for(o in u)"children"===o||"key"===o||o in l||I(n,o,null,u[o],t);for(o in l)i&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||I(n,o,l[o],u[o],t);}function H(n,l,u){"-"===l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||a$1.test(l)?u:u+"px";}function I(n,l,u,t,i){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof t&&(n.style.cssText=t=""),t)for(l in t)u&&l in u||H(n.style,l,"");if(u)for(l in u)t&&u[l]===t[l]||H(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/(PointerCapture)$|Capture$/,"$1")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?t?u.u=t.u:(u.u=Date.now(),n.addEventListener(l,o?j$1:T$1,o)):n.removeEventListener(l,o?j$1:T$1,o);else if("dangerouslySetInnerHTML"!==l){if(i)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==l&&"height"!==l&&"href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&"rowSpan"!==l&&"colSpan"!==l&&"role"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&"-"!==l[4]?n.removeAttribute(l):n.setAttribute(l,u));}}function T$1(n){var u=this.l[n.type+!1];if(n.t){if(n.t<=u.u)return}else n.t=Date.now();return u(l$1.event?l$1.event(n):n)}function j$1(n){return this.l[n.type+!0](l$1.event?l$1.event(n):n)}function z$1(n,u,t,i,o,r,f,e,c,s){var a,p,y,d,_,g,m,w,x,$,C,S,A,D,H,I=u.type;if(void 0!==u.constructor)return null;null!=t.__h&&(c=t.__h,e=u.__e=t.__e,u.__h=null,r=[e]),(a=l$1.__b)&&a(u);n:if("function"==typeof I)try{if(w=u.props,x=(a=I.contextType)&&i[a.__c],$=a?x?x.props.value:a.__:i,t.__c?m=(p=u.__c=t.__c).__=p.__E:("prototype"in I&&I.prototype.render?u.__c=p=new I(w,$):(u.__c=p=new b$1(w,$),p.constructor=I,p.render=q),x&&x.sub(p),p.props=w,p.state||(p.state={}),p.context=$,p.__n=i,y=p.__d=!0,p.__h=[],p._sb=[]),null==p.__s&&(p.__s=p.state),null!=I.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=h$1({},p.__s)),h$1(p.__s,I.getDerivedStateFromProps(w,p.__s))),d=p.props,_=p.state,p.__v=u,y)null==I.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else {if(null==I.getDerivedStateFromProps&&w!==d&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(w,$),!p.__e&&(null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(w,p.__s,$)||u.__v===t.__v)){for(u.__v!==t.__v&&(p.props=w,p.state=p.__s,p.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.forEach(function(n){n&&(n.__=u);}),C=0;C<p._sb.length;C++)p.__h.push(p._sb[C]);p._sb=[],p.__h.length&&f.push(p);break n}null!=p.componentWillUpdate&&p.componentWillUpdate(w,p.__s,$),null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(d,_,g);});}if(p.context=$,p.props=w,p.__P=n,p.__e=!1,S=l$1.__r,A=0,"prototype"in I&&I.prototype.render){for(p.state=p.__s,p.__d=!1,S&&S(u),a=p.render(p.props,p.state,p.context),D=0;D<p._sb.length;D++)p.__h.push(p._sb[D]);p._sb=[];}else do{p.__d=!1,S&&S(u),a=p.render(p.props,p.state,p.context),p.state=p.__s;}while(p.__d&&++A<25);p.state=p.__s,null!=p.getChildContext&&(i=h$1(h$1({},i),p.getChildContext())),y||null==p.getSnapshotBeforeUpdate||(g=p.getSnapshotBeforeUpdate(d,_)),P(n,v$1(H=null!=a&&a.type===k$1&&null==a.key?a.props.children:a)?H:[H],u,t,i,o,r,f,e,c,s),p.base=u.__e,u.__h=null,p.__h.length&&f.push(p),m&&(p.__E=p.__=null);}catch(n){u.__v=null,(c||null!=r)&&(u.__e=e,u.__h=!!c,r[r.indexOf(e)]=null),l$1.__e(n,u,t);}else null==r&&u.__v===t.__v?(u.__k=t.__k,u.__e=t.__e):u.__e=M(t.__e,u,t,i,o,r,f,c,s);(a=l$1.diffed)&&a(u);}function L(n,u,t){for(var i=0;i<t.length;i++)N(t[i],t[++i],t[++i]);l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function M(l,u,t,i,o,r,f,e,s){var a,h,y,d=t.props,_=u.props,k=u.type,b=0;if("svg"===k&&(o=!0),null!=r)for(;b<r.length;b++)if((a=r[b])&&"setAttribute"in a==!!k&&(k?a.localName===k:3===a.nodeType)){l=a,r[b]=null;break}if(null==l){if(null===k)return document.createTextNode(_);l=o?document.createElementNS("http://www.w3.org/2000/svg",k):document.createElement(k,_.is&&_),r=null,e=!1;}if(null===k)d===_||e&&l.data===_||(l.data=_);else {if(r=r&&n$1.call(l.childNodes),h=(d=t.props||c$1).dangerouslySetInnerHTML,y=_.dangerouslySetInnerHTML,!e){if(null!=r)for(d={},b=0;b<l.attributes.length;b++)d[l.attributes[b].name]=l.attributes[b].value;(y||h)&&(y&&(h&&y.__html==h.__html||y.__html===l.innerHTML)||(l.innerHTML=y&&y.__html||""));}if(D(l,_,d,o,e),y)u.__k=[];else if(P(l,v$1(b=u.props.children)?b:[b],u,t,i,o&&"foreignObject"!==k,r,f,r?r[0]:t.__k&&g$1(t,0),e,s),null!=r)for(b=r.length;b--;)null!=r[b]&&p$1(r[b]);e||("value"in _&&void 0!==(b=_.value)&&(b!==l.value||"progress"===k&&!b||"option"===k&&b!==d.value)&&I(l,"value",b,d.value,!1),"checked"in _&&void 0!==(b=_.checked)&&b!==l.checked&&I(l,"checked",b,d.checked,!1));}return l}function N(n,u,t){try{"function"==typeof n?n(u):n.current=u;}catch(n){l$1.__e(n,t);}}function O(n,u,t){var i,o;if(l$1.unmount&&l$1.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||N(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount();}catch(n){l$1.__e(n,u);}i.base=i.__P=null,n.__c=void 0;}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&O(i[o],u,t||"function"!=typeof n.type);t||null==n.__e||p$1(n.__e),n.__=n.__e=n.__d=void 0;}function q(n,l,u){return this.constructor(n,u)}function B$1(u,t,i){var o,r,f,e;l$1.__&&l$1.__(u,t),r=(o="function"==typeof i)?null:i&&i.__k||t.__k,f=[],e=[],z$1(t,u=(!o&&i||t).__k=y$1(k$1,null,[u]),r||c$1,c$1,void 0!==t.ownerSVGElement,!o&&i?[i]:r?null:t.firstChild?n$1.call(t.childNodes):null,f,!o&&i?i:r?r.__e:t.firstChild,o,e),L(f,u,e);}n$1=s$1.slice,l$1={__e:function(n,l,u,t){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),r=i.__d),r)return i.__E=i}catch(l){n=l;}throw n}},u$1=0,b$1.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h$1({},this.state),"function"==typeof n&&(n=n(h$1({},u),this.props)),n&&h$1(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),w$1(this));},b$1.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),w$1(this));},b$1.prototype.render=k$1,i$1=[],r$2="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f$1=function(n,l){return n.__v.__b-l.__v.__b},x.__r=0;
27302
+ var n$1,l$1,u$1,i$1,o$1,r$2,f$1,c$1={},s$1=[],a$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,h$1=Array.isArray;function v$1(n,l){for(var u in l)n[u]=l[u];return n}function p$1(n){var l=n.parentNode;l&&l.removeChild(n);}function y$1(l,u,t){var i,o,r,f={};for(r in u)"key"==r?i=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n$1.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return d$1(l,f,i,o,null)}function d$1(n,t,i,o,r){var f={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++u$1:r,__i:-1,__u:0};return null==r&&null!=l$1.vnode&&l$1.vnode(f),f}function g(n){return n.children}function b(n,l){this.props=n,this.context=l;}function m$2(n,l){if(null==l)return n.__?m$2(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?m$2(n):null}function w$1(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return w$1(n)}}function k$1(n){(!n.__d&&(n.__d=!0)&&i$1.push(n)&&!x$1.__r++||o$1!==l$1.debounceRendering)&&((o$1=l$1.debounceRendering)||r$2)(x$1);}function x$1(){var n,u,t,o,r,e,c,s,a;for(i$1.sort(f$1);n=i$1.shift();)n.__d&&(u=i$1.length,o=void 0,e=(r=(t=n).__v).__e,s=[],a=[],(c=t.__P)&&((o=v$1({},r)).__v=r.__v+1,l$1.vnode&&l$1.vnode(o),L(c,o,r,t.__n,void 0!==c.ownerSVGElement,32&r.__u?[e]:null,s,null==e?m$2(r):e,!!(32&r.__u),a),o.__v=r.__v,o.__.__k[o.__i]=o,M(s,o,a),o.__e!=e&&w$1(o)),i$1.length>u&&i$1.sort(f$1));x$1.__r=0;}function C$1(n,l,u,t,i,o,r,f,e,a,h){var v,p,y,d,_,g=t&&t.__k||s$1,b=l.length;for(u.__d=e,P(u,l,g),e=u.__d,v=0;v<b;v++)null!=(y=u.__k[v])&&"boolean"!=typeof y&&"function"!=typeof y&&(p=-1===y.__i?c$1:g[y.__i]||c$1,y.__i=v,L(n,y,p,i,o,r,f,e,a,h),d=y.__e,y.ref&&p.ref!=y.ref&&(p.ref&&z$1(p.ref,null,y),h.push(y.ref,y.__c||d,y)),null==_&&null!=d&&(_=d),65536&y.__u||p.__k===y.__k?e=S(y,e,n):"function"==typeof y.type&&void 0!==y.__d?e=y.__d:d&&(e=d.nextSibling),y.__d=void 0,y.__u&=-196609);u.__d=e,u.__e=_;}function P(n,l,u){var t,i,o,r,f,e=l.length,c=u.length,s=c,a=0;for(n.__k=[],t=0;t<e;t++)r=t+a,null!=(i=n.__k[t]=null==(i=l[t])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?d$1(null,i,null,null,null):h$1(i)?d$1(g,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?d$1(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=n,i.__b=n.__b+1,f=H(i,u,r,s),i.__i=f,o=null,-1!==f&&(s--,(o=u[f])&&(o.__u|=131072)),null==o||null===o.__v?(-1==f&&a--,"function"!=typeof i.type&&(i.__u|=65536)):f!==r&&(f===r+1?a++:f>r?s>e-r?a+=f-r:a--:f<r?f==r-1&&(a=f-r):a=0,f!==t+a&&(i.__u|=65536))):(o=u[r])&&null==o.key&&o.__e&&0==(131072&o.__u)&&(o.__e==n.__d&&(n.__d=m$2(o)),N(o,o,!1),u[r]=null,s--);if(s)for(t=0;t<c;t++)null!=(o=u[t])&&0==(131072&o.__u)&&(o.__e==n.__d&&(n.__d=m$2(o)),N(o,o));}function S(n,l,u){var t,i;if("function"==typeof n.type){for(t=n.__k,i=0;t&&i<t.length;i++)t[i]&&(t[i].__=n,l=S(t[i],l,u));return l}n.__e!=l&&(u.insertBefore(n.__e,l||null),l=n.__e);do{l=l&&l.nextSibling;}while(null!=l&&8===l.nodeType);return l}function H(n,l,u,t){var i=n.key,o=n.type,r=u-1,f=u+1,e=l[u];if(null===e||e&&i==e.key&&o===e.type&&0==(131072&e.__u))return u;if(t>(null!=e&&0==(131072&e.__u)?1:0))for(;r>=0||f<l.length;){if(r>=0){if((e=l[r])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return r;r--;}if(f<l.length){if((e=l[f])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return f;f++;}}return -1}function I(n,l,u){"-"===l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||a$1.test(l)?u:u+"px";}function T(n,l,u,t,i){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof t&&(n.style.cssText=t=""),t)for(l in t)u&&l in u||I(n.style,l,"");if(u)for(l in u)t&&u[l]===t[l]||I(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/(PointerCapture)$|Capture$/i,"$1")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?t?u.u=t.u:(u.u=Date.now(),n.addEventListener(l,o?D$1:A$1,o)):n.removeEventListener(l,o?D$1:A$1,o);else {if(i)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==l&&"height"!==l&&"href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&"rowSpan"!==l&&"colSpan"!==l&&"role"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&"-"!==l[4]?n.removeAttribute(l):n.setAttribute(l,u));}}function A$1(n){if(this.l){var u=this.l[n.type+!1];if(n.t){if(n.t<=u.u)return}else n.t=Date.now();return u(l$1.event?l$1.event(n):n)}}function D$1(n){if(this.l)return this.l[n.type+!0](l$1.event?l$1.event(n):n)}function L(n,u,t,i,o,r,f,e,c,s){var a,p,y,d,_,m,w,k,x,P,S,$,H,I,T,A=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),r=[e=u.__e=t.__e]),(a=l$1.__b)&&a(u);n:if("function"==typeof A)try{if(k=u.props,x=(a=A.contextType)&&i[a.__c],P=a?x?x.props.value:a.__:i,t.__c?w=(p=u.__c=t.__c).__=p.__E:("prototype"in A&&A.prototype.render?u.__c=p=new A(k,P):(u.__c=p=new b(k,P),p.constructor=A,p.render=O),x&&x.sub(p),p.props=k,p.state||(p.state={}),p.context=P,p.__n=i,y=p.__d=!0,p.__h=[],p._sb=[]),null==p.__s&&(p.__s=p.state),null!=A.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=v$1({},p.__s)),v$1(p.__s,A.getDerivedStateFromProps(k,p.__s))),d=p.props,_=p.state,p.__v=u,y)null==A.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else {if(null==A.getDerivedStateFromProps&&k!==d&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(k,P),!p.__e&&(null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(k,p.__s,P)||u.__v===t.__v)){for(u.__v!==t.__v&&(p.props=k,p.state=p.__s,p.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.forEach(function(n){n&&(n.__=u);}),S=0;S<p._sb.length;S++)p.__h.push(p._sb[S]);p._sb=[],p.__h.length&&f.push(p);break n}null!=p.componentWillUpdate&&p.componentWillUpdate(k,p.__s,P),null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(d,_,m);});}if(p.context=P,p.props=k,p.__P=n,p.__e=!1,$=l$1.__r,H=0,"prototype"in A&&A.prototype.render){for(p.state=p.__s,p.__d=!1,$&&$(u),a=p.render(p.props,p.state,p.context),I=0;I<p._sb.length;I++)p.__h.push(p._sb[I]);p._sb=[];}else do{p.__d=!1,$&&$(u),a=p.render(p.props,p.state,p.context),p.state=p.__s;}while(p.__d&&++H<25);p.state=p.__s,null!=p.getChildContext&&(i=v$1(v$1({},i),p.getChildContext())),y||null==p.getSnapshotBeforeUpdate||(m=p.getSnapshotBeforeUpdate(d,_)),C$1(n,h$1(T=null!=a&&a.type===g&&null==a.key?a.props.children:a)?T:[T],u,t,i,o,r,f,e,c,s),p.base=u.__e,u.__u&=-161,p.__h.length&&f.push(p),w&&(p.__E=p.__=null);}catch(n){u.__v=null,c||null!=r?(u.__e=e,u.__u|=c?160:32,r[r.indexOf(e)]=null):(u.__e=t.__e,u.__k=t.__k),l$1.__e(n,u,t);}else null==r&&u.__v===t.__v?(u.__k=t.__k,u.__e=t.__e):u.__e=j$1(t.__e,u,t,i,o,r,f,c,s);(a=l$1.diffed)&&a(u);}function M(n,u,t){u.__d=void 0;for(var i=0;i<t.length;i++)z$1(t[i],t[++i],t[++i]);l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function j$1(l,u,t,i,o,r,f,e,s){var a,v,y,d,_,g,b,w=t.props,k=u.props,x=u.type;if("svg"===x&&(o=!0),null!=r)for(a=0;a<r.length;a++)if((_=r[a])&&"setAttribute"in _==!!x&&(x?_.localName===x:3===_.nodeType)){l=_,r[a]=null;break}if(null==l){if(null===x)return document.createTextNode(k);l=o?document.createElementNS("http://www.w3.org/2000/svg",x):document.createElement(x,k.is&&k),r=null,e=!1;}if(null===x)w===k||e&&l.data===k||(l.data=k);else {if(r=r&&n$1.call(l.childNodes),w=t.props||c$1,!e&&null!=r)for(w={},a=0;a<l.attributes.length;a++)w[(_=l.attributes[a]).name]=_.value;for(a in w)_=w[a],"children"==a||("dangerouslySetInnerHTML"==a?y=_:"key"===a||a in k||T(l,a,null,_,o));for(a in k)_=k[a],"children"==a?d=_:"dangerouslySetInnerHTML"==a?v=_:"value"==a?g=_:"checked"==a?b=_:"key"===a||e&&"function"!=typeof _||w[a]===_||T(l,a,_,w[a],o);if(v)e||y&&(v.__html===y.__html||v.__html===l.innerHTML)||(l.innerHTML=v.__html),u.__k=[];else if(y&&(l.innerHTML=""),C$1(l,h$1(d)?d:[d],u,t,i,o&&"foreignObject"!==x,r,f,r?r[0]:t.__k&&m$2(t,0),e,s),null!=r)for(a=r.length;a--;)null!=r[a]&&p$1(r[a]);e||(a="value",void 0!==g&&(g!==l[a]||"progress"===x&&!g||"option"===x&&g!==w[a])&&T(l,a,g,w[a],!1),a="checked",void 0!==b&&b!==l[a]&&T(l,a,b,w[a],!1));}return l}function z$1(n,u,t){try{"function"==typeof n?n(u):n.current=u;}catch(n){l$1.__e(n,t);}}function N(n,u,t){var i,o;if(l$1.unmount&&l$1.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||z$1(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount();}catch(n){l$1.__e(n,u);}i.base=i.__P=null,n.__c=void 0;}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&N(i[o],u,t||"function"!=typeof n.type);t||null==n.__e||p$1(n.__e),n.__=n.__e=n.__d=void 0;}function O(n,l,u){return this.constructor(n,u)}function q$1(u,t,i){var o,r,f,e;l$1.__&&l$1.__(u,t),r=(o="function"==typeof i)?null:i&&i.__k||t.__k,f=[],e=[],L(t,u=(!o&&i||t).__k=y$1(g,null,[u]),r||c$1,c$1,void 0!==t.ownerSVGElement,!o&&i?[i]:r?null:t.firstChild?n$1.call(t.childNodes):null,f,!o&&i?i:r?r.__e:t.firstChild,o,e),M(f,u,e);}n$1=s$1.slice,l$1={__e:function(n,l,u,t){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),r=i.__d),r)return i.__E=i}catch(l){n=l;}throw n}},u$1=0,b.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=v$1({},this.state),"function"==typeof n&&(n=n(v$1({},u),this.props)),n&&v$1(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),k$1(this));},b.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),k$1(this));},b.prototype.render=g,i$1=[],r$2="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f$1=function(n,l){return n.__v.__b-l.__v.__b},x$1.__r=0;
27188
27303
 
27189
27304
  var n=function(t,s,r,e){var u;s[0]=0;for(var h=1;h<s.length;h++){var p=s[h++],a=s[h]?(s[0]|=p?1:2,r[s[h++]]):s[++h];3===p?e[0]=a:4===p?e[1]=Object.assign(e[1]||{},a):5===p?(e[1]=e[1]||{})[s[++h]]=a:6===p?e[1][s[++h]]+=a+"":p?(u=t.apply(a,n(t,a,r,["",null])),e.push(u),a[0]?s[0]|=2:(s[h-2]=0,s[h]=u)):e.push(a);}return e},t$1=new Map;function e$1(s){var r=t$1.get(this);return r||(r=new Map,t$1.set(this,r)),(r=n(this,r.get(s)||(r.set(s,r=function(n){for(var t,s,r=1,e="",u="",h=[0],p=function(n){1===r&&(n||(e=e.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?h.push(0,n,e):3===r&&(n||e)?(h.push(3,n,e),r=2):2===r&&"..."===e&&n?h.push(4,n,0):2===r&&e&&!n?h.push(5,0,!0,e):r>=5&&((e||!n&&5===r)&&(h.push(r,0,e,s),r=6),n&&(h.push(r,n,0,s),r=6)),e="";},a=0;a<n.length;a++){a&&(1===r&&p(),p(a));for(var l=0;l<n[a].length;l++)t=n[a][l],1===r?"<"===t?(p(),h=[h],r=3):e+=t:4===r?"--"===e&&">"===t?(r=1,e=""):e=t+e[0]:u?t===u?u="":e+=t:'"'===t||"'"===t?u=t:">"===t?(p(),r=1):r&&("="===t?(r=5,s=e,e=""):"/"===t&&(r<5||">"===n[a][l+1])?(p(),3===r&&(h=h[0]),r=h,(h=h[0]).push(2,0,r),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(p(),r=2):e+=t),3===r&&"!--"===e&&(r=4,h=h[0]);}return p(),h}(s)),r),arguments,[])).length>1?r:r[0]}
27190
27305
 
27191
27306
  var m$1=e$1.bind(y$1);
27192
27307
 
27193
- var t,r$1,u,i,o=0,f=[],c=[],e=l$1.__b,a=l$1.__r,v=l$1.diffed,l=l$1.__c,m=l$1.unmount;function d(t,u){l$1.__h&&l$1.__h(r$1,t,o||u),o=0;var i=r$1.__H||(r$1.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:c}),i.__[t]}function h(n){return o=1,s(B,n)}function s(n,u,i){var o=d(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):B(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}));}],o.__c=r$1,!r$1.u)){var f=function(n,t,r){if(!o.__c.__H)return !0;var u=o.__c.__H.__.filter(function(n){return n.__c});if(u.every(function(n){return !n.__N}))return !c||c.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0);}}),!(!i&&o.__c.props===n)&&(!c||c.call(this,n,t,r))};r$1.u=!0;var c=r$1.shouldComponentUpdate,e=r$1.componentWillUpdate;r$1.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u;}e&&e.call(this,n,t,r);},r$1.shouldComponentUpdate=f;}return o.__N||o.__}function p(u,i){var o=d(t++,3);!l$1.__s&&z(o.__H,i)&&(o.__=u,o.i=i,r$1.__H.__h.push(o));}function y(u,i){var o=d(t++,4);!l$1.__s&&z(o.__H,i)&&(o.__=u,o.i=i,r$1.__h.push(o));}function _(n){return o=5,F(function(){return {current:n}},[])}function F(n,r){var u=d(t++,7);return z(u.__H,r)?(u.__V=n(),u.i=r,u.__h=n,u.__V):u.__}function T(n,t){return o=8,F(function(){return n},t)}function b(){for(var t;t=f.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(k),t.__H.__h.forEach(w),t.__H.__h=[];}catch(r){t.__H.__h=[],l$1.__e(r,t.__v);}}l$1.__b=function(n){r$1=null,e&&e(n);},l$1.__r=function(n){a&&a(n),t=0;var i=(r$1=n.__c).__H;i&&(u===r$1?(i.__h=[],r$1.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=c,n.__N=n.i=void 0;})):(i.__h.forEach(k),i.__h.forEach(w),i.__h=[],t=0)),u=r$1;},l$1.diffed=function(t){v&&v(t);var o=t.__c;o&&o.__H&&(o.__H.__h.length&&(1!==f.push(o)&&i===l$1.requestAnimationFrame||((i=l$1.requestAnimationFrame)||j)(b)),o.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==c&&(n.__=n.__V),n.i=void 0,n.__V=c;})),u=r$1=null;},l$1.__c=function(t,r){r.some(function(t){try{t.__h.forEach(k),t.__h=t.__h.filter(function(n){return !n.__||w(n)});}catch(u){r.some(function(n){n.__h&&(n.__h=[]);}),r=[],l$1.__e(u,t.__v);}}),l&&l(t,r);},l$1.unmount=function(t){m&&m(t);var r,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{k(n);}catch(n){r=n;}}),u.__H=void 0,r&&l$1.__e(r,u.__v));};var g="function"==typeof requestAnimationFrame;function j(n){var t,r=function(){clearTimeout(u),g&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);g&&(t=requestAnimationFrame(r));}function k(n){var t=r$1,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r$1=t;}function w(n){var t=r$1;n.__c=n.__(),r$1=t;}function z(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function B(n,t){return "function"==typeof t?t(n):t}
27308
+ var t,r$1,u,i,o=0,f=[],c=[],e=l$1,a=e.__b,v=e.__r,l=e.diffed,m=e.__c,s=e.unmount,d=e.__;function h(n,t){e.__h&&e.__h(r$1,n,o||t),o=0;var u=r$1.__H||(r$1.__H={__:[],__h:[]});return n>=u.__.length&&u.__.push({__V:c}),u.__[n]}function p(n){return o=1,y(D,n)}function y(n,u,i){var o=h(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):D(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}));}],o.__c=r$1,!r$1.u)){var f=function(n,t,r){if(!o.__c.__H)return !0;var u=o.__c.__H.__.filter(function(n){return !!n.__c});if(u.every(function(n){return !n.__N}))return !c||c.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0);}}),!(!i&&o.__c.props===n)&&(!c||c.call(this,n,t,r))};r$1.u=!0;var c=r$1.shouldComponentUpdate,e=r$1.componentWillUpdate;r$1.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u;}e&&e.call(this,n,t,r);},r$1.shouldComponentUpdate=f;}return o.__N||o.__}function _(n,u){var i=h(t++,3);!e.__s&&C(i.__H,u)&&(i.__=n,i.i=u,r$1.__H.__h.push(i));}function A(n,u){var i=h(t++,4);!e.__s&&C(i.__H,u)&&(i.__=n,i.i=u,r$1.__h.push(i));}function F(n){return o=5,q(function(){return {current:n}},[])}function q(n,r){var u=h(t++,7);return C(u.__H,r)?(u.__V=n(),u.i=r,u.__h=n,u.__V):u.__}function x(n,t){return o=8,q(function(){return n},t)}function j(){for(var n;n=f.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(z),n.__H.__h.forEach(B),n.__H.__h=[];}catch(t){n.__H.__h=[],e.__e(t,n.__v);}}e.__b=function(n){r$1=null,a&&a(n);},e.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),d&&d(n,t);},e.__r=function(n){v&&v(n),t=0;var i=(r$1=n.__c).__H;i&&(u===r$1?(i.__h=[],r$1.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=c,n.__N=n.i=void 0;})):(i.__h.forEach(z),i.__h.forEach(B),i.__h=[],t=0)),u=r$1;},e.diffed=function(n){l&&l(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f.push(t)&&i===e.requestAnimationFrame||((i=e.requestAnimationFrame)||w)(j)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==c&&(n.__=n.__V),n.i=void 0,n.__V=c;})),u=r$1=null;},e.__c=function(n,t){t.some(function(n){try{n.__h.forEach(z),n.__h=n.__h.filter(function(n){return !n.__||B(n)});}catch(r){t.some(function(n){n.__h&&(n.__h=[]);}),t=[],e.__e(r,n.__v);}}),m&&m(n,t);},e.unmount=function(n){s&&s(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{z(n);}catch(n){t=n;}}),r.__H=void 0,t&&e.__e(t,r.__v));};var k="function"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);k&&(t=requestAnimationFrame(r));}function z(n){var t=r$1,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r$1=t;}function B(n){var t=r$1;n.__c=n.__(),r$1=t;}function C(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function D(n,t){return "function"==typeof t?t(n):t}
27194
27309
 
27195
- function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
27310
+ function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
27196
27311
 
27197
27312
  /**
27198
27313
  * @typedef {import('./PopupMenuProvider').PopupMenuEntry} PopupMenuEntry
@@ -27223,10 +27338,14 @@
27223
27338
  class=${ clsx('entry', { selected }) }
27224
27339
  data-id=${ entry.id }
27225
27340
  title=${ entry.title || entry.label }
27341
+ tabIndex="0"
27226
27342
  onClick=${ onAction }
27343
+ onFocus=${ onMouseEnter }
27344
+ onBlur=${ onMouseLeave }
27227
27345
  onMouseEnter=${ onMouseEnter }
27228
27346
  onMouseLeave=${ onMouseLeave }
27229
27347
  onDragStart=${ (event) => onAction(event, entry, 'dragstart') }
27348
+ aria-role="button"
27230
27349
  draggable=${ true }
27231
27350
  >
27232
27351
  <div class="djs-popup-entry-content">
@@ -27290,12 +27409,12 @@
27290
27409
  ...restProps
27291
27410
  } = props;
27292
27411
 
27293
- const resultsRef = _();
27412
+ const resultsRef = F();
27294
27413
 
27295
- const groups = F(() => groupEntries(entries), [ entries ]);
27414
+ const groups = q(() => groupEntries(entries), [ entries ]);
27296
27415
 
27297
27416
  // scroll to selected result
27298
- y(() => {
27417
+ A(() => {
27299
27418
  const containerEl = resultsRef.current;
27300
27419
 
27301
27420
  if (!containerEl)
@@ -27414,7 +27533,7 @@
27414
27533
  onClosed
27415
27534
  } = props;
27416
27535
 
27417
- const searchable = F(() => {
27536
+ const searchable = q(() => {
27418
27537
  if (!isDefined(search)) {
27419
27538
  return false;
27420
27539
  }
@@ -27422,11 +27541,9 @@
27422
27541
  return originalEntries.length > 5;
27423
27542
  }, [ search, originalEntries ]);
27424
27543
 
27425
- const inputRef = _();
27426
-
27427
- const [ value, setValue ] = h('');
27544
+ const [ value, setValue ] = p('');
27428
27545
 
27429
- const filterEntries = T((originalEntries, value) => {
27546
+ const filterEntries = x((originalEntries, value) => {
27430
27547
 
27431
27548
  if (!searchable) {
27432
27549
  return originalEntries;
@@ -27457,10 +27574,10 @@
27457
27574
  return originalEntries.filter(filter);
27458
27575
  }, [ searchable ]);
27459
27576
 
27460
- const [ entries, setEntries ] = h(filterEntries(originalEntries, value));
27461
- const [ selectedEntry, setSelectedEntry ] = h(entries[0]);
27577
+ const [ entries, setEntries ] = p(filterEntries(originalEntries, value));
27578
+ const [ selectedEntry, setSelectedEntry ] = p(entries[0]);
27462
27579
 
27463
- const updateEntries = T((newEntries) => {
27580
+ const updateEntries = x((newEntries) => {
27464
27581
 
27465
27582
  // select first entry if non is selected
27466
27583
  if (!selectedEntry || !newEntries.includes(selectedEntry)) {
@@ -27471,34 +27588,12 @@
27471
27588
  }, [ selectedEntry, setEntries, setSelectedEntry ]);
27472
27589
 
27473
27590
  // filter entries on value change
27474
- p(() => {
27591
+ _(() => {
27475
27592
  updateEntries(filterEntries(originalEntries, value));
27476
27593
  }, [ value, originalEntries ]);
27477
27594
 
27478
- // register global <Escape> handler
27479
- p(() => {
27480
- const handleKeyDown = event => {
27481
- if (event.key === 'Escape') {
27482
- event.preventDefault();
27483
-
27484
- return onClose();
27485
- }
27486
- };
27487
-
27488
- document.documentElement.addEventListener('keydown', handleKeyDown);
27489
-
27490
- return () => {
27491
- document.documentElement.removeEventListener('keydown', handleKeyDown);
27492
- };
27493
- }, []);
27494
-
27495
- // focus input on initial mount
27496
- y(() => {
27497
- inputRef.current && inputRef.current.focus();
27498
- }, []);
27499
-
27500
27595
  // handle keyboard seleciton
27501
- const keyboardSelect = T(direction => {
27596
+ const keyboardSelect = x(direction => {
27502
27597
  const idx = entries.indexOf(selectedEntry);
27503
27598
 
27504
27599
  let nextIdx = idx + direction;
@@ -27514,33 +27609,33 @@
27514
27609
  setSelectedEntry(entries[nextIdx]);
27515
27610
  }, [ entries, selectedEntry, setSelectedEntry ]);
27516
27611
 
27517
- const handleKeyDown = T(event => {
27612
+ const handleKeyDown = x(event => {
27518
27613
  if (event.key === 'Enter' && selectedEntry) {
27519
27614
  return onSelect(event, selectedEntry);
27520
27615
  }
27521
27616
 
27522
- // ARROW_UP or SHIFT + TAB navigation
27523
- if (event.key === 'ArrowUp' || (event.key === 'Tab' && event.shiftKey)) {
27617
+ // ARROW_UP
27618
+ if (event.key === 'ArrowUp') {
27524
27619
  keyboardSelect(-1);
27525
27620
 
27526
27621
  return event.preventDefault();
27527
27622
  }
27528
27623
 
27529
- // ARROW_DOWN or TAB navigation
27530
- if (event.key === 'ArrowDown' || event.key === 'Tab') {
27624
+ // ARROW_DOWN
27625
+ if (event.key === 'ArrowDown') {
27531
27626
  keyboardSelect(1);
27532
27627
 
27533
27628
  return event.preventDefault();
27534
27629
  }
27535
- }, [ onSelect, onClose, selectedEntry, keyboardSelect ]);
27630
+ }, [ onSelect, selectedEntry, keyboardSelect ]);
27536
27631
 
27537
- const handleKey = T(event => {
27632
+ const handleKey = x(event => {
27538
27633
  if (matches(event.target, 'input')) {
27539
27634
  setValue(() => event.target.value);
27540
27635
  }
27541
27636
  }, [ setValue ]);
27542
27637
 
27543
- p(() => {
27638
+ _(() => {
27544
27639
  onOpened();
27545
27640
 
27546
27641
  return () => {
@@ -27548,7 +27643,7 @@
27548
27643
  };
27549
27644
  }, []);
27550
27645
 
27551
- const displayHeader = F(() => title || headerEntries.length > 0, [ title, headerEntries ]);
27646
+ const displayHeader = q(() => title || headerEntries.length > 0, [ title, headerEntries ]);
27552
27647
 
27553
27648
  return m$1`
27554
27649
  <${PopupMenuWrapper}
@@ -27564,13 +27659,15 @@
27564
27659
  <div class="djs-popup-header">
27565
27660
  <h3 class="djs-popup-title" title=${ title }>${ title }</h3>
27566
27661
  ${ headerEntries.map(entry => m$1`
27567
- <span
27662
+ <${ entry.action ? 'button' : 'span' }
27568
27663
  class=${ getHeaderClasses(entry, entry === selectedEntry) }
27569
27664
  onClick=${ event => onSelect(event, entry) }
27570
27665
  title=${ entry.title || entry.label }
27571
27666
  data-id=${ entry.id }
27572
27667
  onMouseEnter=${ () => setSelectedEntry(entry) }
27573
27668
  onMouseLeave=${ () => setSelectedEntry(null) }
27669
+ onFocus=${ () => setSelectedEntry(entry) }
27670
+ onBlur=${ () => setSelectedEntry(null) }
27574
27671
  >
27575
27672
  ${(entry.imageUrl && m$1`<img class="djs-popup-entry-icon" src=${ entry.imageUrl } alt="" />`) ||
27576
27673
  (entry.imageHtml && m$1`<div class="djs-popup-entry-icon" dangerouslySetInnerHTML=${ { __html: entry.imageHtml } } />`)}
@@ -27578,7 +27675,7 @@
27578
27675
  ${ entry.label ? m$1`
27579
27676
  <span class="djs-popup-label">${ entry.label }</span>
27580
27677
  ` : null }
27581
- </span>
27678
+ </${ entry.action ? 'button' : 'span' }>
27582
27679
  `) }
27583
27680
  </div>
27584
27681
  ` }
@@ -27590,10 +27687,7 @@
27590
27687
  <svg class="djs-popup-search-icon" width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
27591
27688
  <path fill-rule="evenodd" clip-rule="evenodd" d="M9.0325 8.5H9.625L13.3675 12.25L12.25 13.3675L8.5 9.625V9.0325L8.2975 8.8225C7.4425 9.5575 6.3325 10 5.125 10C2.4325 10 0.25 7.8175 0.25 5.125C0.25 2.4325 2.4325 0.25 5.125 0.25C7.8175 0.25 10 2.4325 10 5.125C10 6.3325 9.5575 7.4425 8.8225 8.2975L9.0325 8.5ZM1.75 5.125C1.75 6.9925 3.2575 8.5 5.125 8.5C6.9925 8.5 8.5 6.9925 8.5 5.125C8.5 3.2575 6.9925 1.75 5.125 1.75C3.2575 1.75 1.75 3.2575 1.75 5.125Z" fill="#22242A"/>
27592
27689
  </svg>
27593
- <input
27594
- ref=${ inputRef }
27595
- type="text"
27596
- />
27690
+ <input type="text" aria-label="${ title }" />
27597
27691
  </div>
27598
27692
  ` }
27599
27693
 
@@ -27604,10 +27698,10 @@
27604
27698
  onAction=${ onSelect }
27605
27699
  />
27606
27700
  </div>
27607
- ${ emptyPlaceholder && entries.length === 0 && m$1`
27608
- <div class="djs-popup-no-results">${ isFunction(emptyPlaceholder) ? emptyPlaceholder(value) : emptyPlaceholder }</div>
27609
- ` }
27610
27701
  ` }
27702
+ ${ emptyPlaceholder && entries.length === 0 && m$1`
27703
+ <div class="djs-popup-no-results">${ isFunction(emptyPlaceholder) ? emptyPlaceholder(value) : emptyPlaceholder }</div>
27704
+ ` }
27611
27705
  </${PopupMenuWrapper}>
27612
27706
  `;
27613
27707
  }
@@ -27627,20 +27721,10 @@
27627
27721
  position: positionGetter
27628
27722
  } = props;
27629
27723
 
27630
- const popupRef = _();
27631
-
27632
- const checkClose = T((event) => {
27633
-
27634
- const popup = closest(event.target, '.djs-popup', true);
27635
-
27636
- if (popup) {
27637
- return;
27638
- }
27724
+ const popupRef = F();
27639
27725
 
27640
- onClose();
27641
- }, [ onClose ]);
27642
-
27643
- y(() => {
27726
+ // initial position
27727
+ A(() => {
27644
27728
  if (typeof positionGetter !== 'function') {
27645
27729
  return;
27646
27730
  }
@@ -27652,26 +27736,58 @@
27652
27736
  popupEl.style.top = `${position.y}px`;
27653
27737
  }, [ popupRef.current, positionGetter ]);
27654
27738
 
27655
- // focus popup initially, on mount
27656
- y(() => {
27657
- popupRef.current && popupRef.current.focus();
27739
+ // initial focus
27740
+ A(() => {
27741
+ const popupEl = popupRef.current;
27742
+
27743
+ if (!popupEl) {
27744
+ return;
27745
+ }
27746
+
27747
+ const inputEl = popupEl.querySelector('input');
27748
+
27749
+ (inputEl || popupEl).focus();
27750
+ }, []);
27751
+
27752
+ // global <Escape> / blur handlers
27753
+ _(() => {
27754
+ const handleKeyDown = event => {
27755
+ if (event.key === 'Escape') {
27756
+ event.preventDefault();
27757
+
27758
+ return onClose();
27759
+ }
27760
+ };
27761
+
27762
+ const handleClick = event => {
27763
+ const popup = closest(event.target, '.djs-popup', true);
27764
+
27765
+ if (popup) {
27766
+ return;
27767
+ }
27768
+
27769
+ return onClose();
27770
+ };
27771
+
27772
+ document.documentElement.addEventListener('keydown', handleKeyDown);
27773
+ document.body.addEventListener('click', handleClick);
27774
+
27775
+ return () => {
27776
+ document.documentElement.removeEventListener('keydown', handleKeyDown);
27777
+ document.body.removeEventListener('click', handleClick);
27778
+ };
27658
27779
  }, []);
27659
27780
 
27660
27781
  return m$1`
27661
27782
  <div
27662
- class="djs-popup-backdrop"
27663
- onClick=${ checkClose }
27783
+ class=${ clsx('djs-popup', className) }
27784
+ style=${ getPopupStyle(props) }
27785
+ onKeydown=${ onKeydown }
27786
+ onKeyup=${ onKeyup }
27787
+ ref=${ popupRef }
27788
+ tabIndex="-1"
27664
27789
  >
27665
- <div
27666
- class=${ clsx('djs-popup', className) }
27667
- style=${ getPopupStyle(props) }
27668
- onKeydown=${ onKeydown }
27669
- onKeyup=${ onKeyup }
27670
- ref=${ popupRef }
27671
- tabIndex="-1"
27672
- >
27673
- ${ children }
27674
- </div>
27790
+ ${ children }
27675
27791
  </div>
27676
27792
  `;
27677
27793
  }
@@ -27761,7 +27877,7 @@
27761
27877
  const element = this.isOpen() && this._current.target;
27762
27878
 
27763
27879
  if (event.element === element) {
27764
- this._render();
27880
+ this.refresh();
27765
27881
  }
27766
27882
  });
27767
27883
 
@@ -27777,7 +27893,7 @@
27777
27893
 
27778
27894
  const {
27779
27895
  position: _position,
27780
- className,
27896
+ providerId: className,
27781
27897
  entries,
27782
27898
  headerEntries,
27783
27899
  emptyPlaceholder,
@@ -27801,7 +27917,7 @@
27801
27917
  const onClose = result => this.close(result);
27802
27918
  const onSelect = (event, entry, action) => this.trigger(event, entry, action);
27803
27919
 
27804
- B$1(
27920
+ q$1(
27805
27921
  m$1`
27806
27922
  <${PopupMenuComponent}
27807
27923
  onClose=${ onClose }
@@ -27855,7 +27971,7 @@
27855
27971
 
27856
27972
  this._current = {
27857
27973
  position,
27858
- className: providerId,
27974
+ providerId,
27859
27975
  target,
27860
27976
  entries,
27861
27977
  headerEntries,
@@ -27871,6 +27987,37 @@
27871
27987
  this._render();
27872
27988
  };
27873
27989
 
27990
+ /**
27991
+ * Refresh the popup menu entries without changing the target or position.
27992
+ */
27993
+ PopupMenu.prototype.refresh = function() {
27994
+ if (!this.isOpen()) {
27995
+ return;
27996
+ }
27997
+
27998
+ const {
27999
+ target,
28000
+ providerId
28001
+ } = this._current;
28002
+
28003
+ const {
28004
+ entries,
28005
+ headerEntries,
28006
+ emptyPlaceholder
28007
+ } = this._getContext(target, providerId);
28008
+
28009
+ this._current = {
28010
+ ...this._current,
28011
+ entries,
28012
+ headerEntries,
28013
+ emptyPlaceholder
28014
+ };
28015
+
28016
+ this._emit('refresh');
28017
+
28018
+ this._render();
28019
+ };
28020
+
27874
28021
 
27875
28022
  PopupMenu.prototype._getContext = function(target, provider) {
27876
28023
 
@@ -27913,7 +28060,7 @@
27913
28060
  PopupMenu.prototype.reset = function() {
27914
28061
  const container = this._current.container;
27915
28062
 
27916
- B$1(null, container);
28063
+ q$1(null, container);
27917
28064
 
27918
28065
  remove$2(container);
27919
28066
  };
@@ -29005,6 +29152,7 @@
29005
29152
  *
29006
29153
  * @param {Shape} source
29007
29154
  * @param {Shape} shape
29155
+ * @param {any} [hints={}]
29008
29156
  *
29009
29157
  * @return {Shape} appended shape
29010
29158
  */
@@ -31081,7 +31229,7 @@
31081
31229
  classes(groupGfx).add(SEGMENT_DRAGGER_CLS);
31082
31230
  classes(groupGfx).add(alignment === 'h' ? 'horizontal' : 'vertical');
31083
31231
 
31084
- translate$2(groupGfx, mid.x, mid.y);
31232
+ translate$1(groupGfx, mid.x, mid.y);
31085
31233
 
31086
31234
  return groupGfx;
31087
31235
  }
@@ -31282,7 +31430,7 @@
31282
31430
 
31283
31431
  append(gfx, bendpoint);
31284
31432
 
31285
- translate$2(bendpoint, p.x, p.y);
31433
+ translate$1(bendpoint, p.x, p.y);
31286
31434
  });
31287
31435
 
31288
31436
  // add floating bendpoint
@@ -31358,7 +31506,7 @@
31358
31506
  return;
31359
31507
  }
31360
31508
 
31361
- translate$2(floating, point.x, point.y);
31509
+ translate$1(floating, point.x, point.y);
31362
31510
 
31363
31511
  }
31364
31512
 
@@ -31392,7 +31540,7 @@
31392
31540
  };
31393
31541
  }
31394
31542
 
31395
- translate$2(draggerVisual, relativePosition.x, relativePosition.y);
31543
+ translate$1(draggerVisual, relativePosition.x, relativePosition.y);
31396
31544
  }
31397
31545
 
31398
31546
  eventBus.on('connection.changed', function(event) {
@@ -31565,8 +31713,7 @@
31565
31713
 
31566
31714
  if (!insert && bendpointIndex === 0) {
31567
31715
  type = RECONNECT_START$1;
31568
- } else
31569
- if (!insert && bendpointIndex === waypoints.length - 1) {
31716
+ } else if (!insert && bendpointIndex === waypoints.length - 1) {
31570
31717
  type = RECONNECT_END$1;
31571
31718
  } else {
31572
31719
  type = UPDATE_WAYPOINTS$1;
@@ -31948,7 +32095,7 @@
31948
32095
  connectionPreview.drawPreview(context, allowed, drawPreviewHints);
31949
32096
  }
31950
32097
 
31951
- translate$2(draggerGfx, event.x, event.y);
32098
+ translate$1(draggerGfx, event.x, event.y);
31952
32099
  }, this);
31953
32100
 
31954
32101
  eventBus.on([
@@ -32189,7 +32336,7 @@
32189
32336
  var draggerPosition = axisFenced(event, segmentStart, segmentEnd, axis);
32190
32337
 
32191
32338
  // update dragger
32192
- translate$2(context.draggerGfx, draggerPosition.x, draggerPosition.y);
32339
+ translate$1(context.draggerGfx, draggerPosition.x, draggerPosition.y);
32193
32340
  }
32194
32341
 
32195
32342
  /**
@@ -33689,7 +33836,7 @@
33689
33836
 
33690
33837
  this._graphicsFactory.drawShape(getVisual(gfx), element);
33691
33838
 
33692
- translate$2(gfx, element.x, element.y);
33839
+ translate$1(gfx, element.x, element.y);
33693
33840
  }
33694
33841
 
33695
33842
  this._previewSupport.addDragger(element, layer, gfx);
@@ -33706,9 +33853,9 @@
33706
33853
  const dragger = this._previewSupport.addDragger(element, layer);
33707
33854
 
33708
33855
  if (isConnection(element)) {
33709
- translate$2(dragger, delta.x, delta.y);
33856
+ translate$1(dragger, delta.x, delta.y);
33710
33857
  } else {
33711
- translate$2(dragger, element.x + delta.x, element.y + delta.y);
33858
+ translate$1(dragger, element.x + delta.x, element.y + delta.y);
33712
33859
  }
33713
33860
  });
33714
33861
 
@@ -33736,7 +33883,7 @@
33736
33883
  height: bounds.height
33737
33884
  });
33738
33885
 
33739
- translate$2(gfx, bounds.x, bounds.y);
33886
+ translate$1(gfx, bounds.x, bounds.y);
33740
33887
 
33741
33888
  this._previewSupport.addDragger(shape, layer, gfx);
33742
33889
  });
@@ -42095,7 +42242,7 @@
42095
42242
 
42096
42243
  var OrderingModule = {
42097
42244
  __depends__: [
42098
- translate
42245
+ TranslateModule
42099
42246
  ],
42100
42247
  __init__: [ 'bpmnOrderingProvider' ],
42101
42248
  bpmnOrderingProvider: [ 'type', BpmnOrderingProvider ]
@@ -42389,6 +42536,11 @@
42389
42536
 
42390
42537
  // API //////////
42391
42538
 
42539
+ /**
42540
+ * @param event
42541
+ * @param elements
42542
+ * @param {any} [context={}]
42543
+ */
42392
42544
  this.start = function(event, elements, context) {
42393
42545
  if (!isArray$3(elements)) {
42394
42546
  elements = [ elements ];
@@ -42544,7 +42696,7 @@
42544
42696
 
42545
42697
  graphicsFactory.drawShape(getVisual(gfx), element);
42546
42698
 
42547
- translate$2(gfx, element.x, element.y);
42699
+ translate$1(gfx, element.x, element.y);
42548
42700
  }
42549
42701
 
42550
42702
  // add preview
@@ -42575,7 +42727,7 @@
42575
42727
  append(activeLayer, dragGroup);
42576
42728
  }
42577
42729
 
42578
- translate$2(dragGroup, event.x, event.y);
42730
+ translate$1(dragGroup, event.x, event.y);
42579
42731
  } else {
42580
42732
  remove$1(dragGroup);
42581
42733
  }
@@ -45175,7 +45327,7 @@
45175
45327
  eventBus.on('spaceTool.selection.move', function(event) {
45176
45328
  var crosshairGroup = event.context.crosshairGroup;
45177
45329
 
45178
- translate$2(crosshairGroup, event.x, event.y);
45330
+ translate$1(crosshairGroup, event.x, event.y);
45179
45331
  });
45180
45332
 
45181
45333
  // remove crosshair
@@ -45310,7 +45462,7 @@
45310
45462
  delta[ opposite[ context.axis ] ] = 0;
45311
45463
 
45312
45464
  // update move previews
45313
- translate$2(context.dragGroup, delta.x, delta.y);
45465
+ translate$1(context.dragGroup, delta.x, delta.y);
45314
45466
 
45315
45467
  // update resize previews
45316
45468
  forEach$1(context.frames, function(frame) {
@@ -50181,9 +50333,7 @@
50181
50333
  if (attach === true) {
50182
50334
  newHost = target;
50183
50335
  newParent = target.parent;
50184
- } else
50185
-
50186
- if (attach === false) {
50336
+ } else if (attach === false) {
50187
50337
  newHost = null;
50188
50338
  }
50189
50339
 
@@ -57283,9 +57433,9 @@
57283
57433
  };
57284
57434
 
57285
57435
  /**
57286
- * Returns the number of actions that are currently registered
57436
+ * Returns the identifiers of all currently registered editor actions
57287
57437
  *
57288
- * @return {number}
57438
+ * @return {string[]}
57289
57439
  */
57290
57440
  EditorActions.prototype.getActions = function() {
57291
57441
  return Object.keys(this._actions);
@@ -60013,7 +60163,7 @@
60013
60163
 
60014
60164
  append(defaultLayer, gfx);
60015
60165
 
60016
- translate$2(gfx, element.x, element.y);
60166
+ translate$1(gfx, element.x, element.y);
60017
60167
  }
60018
60168
 
60019
60169
  if (is$1(element, 'bpmn:TextAnnotation') ||
@@ -60956,7 +61106,7 @@
60956
61106
  }
60957
61107
  }
60958
61108
 
60959
- translate$2(dragGroup, event.dx, event.dy);
61109
+ translate$1(dragGroup, event.dx, event.dy);
60960
61110
  });
60961
61111
 
60962
61112
  eventBus.on([ 'shape.move.out', 'shape.move.cleanup' ], function(event) {
@@ -62178,7 +62328,12 @@
62178
62328
  'mouse'
62179
62329
  ];
62180
62330
 
62181
-
62331
+ /**
62332
+ *
62333
+ * @param event
62334
+ * @param {boolean} [autoActivate]
62335
+ * @param {object} [context]
62336
+ */
62182
62337
  HandTool.prototype.activateMove = function(event, autoActivate, context) {
62183
62338
  if (typeof autoActivate === 'object') {
62184
62339
  context = autoActivate;
@@ -62194,6 +62349,12 @@
62194
62349
  });
62195
62350
  };
62196
62351
 
62352
+ /**
62353
+ *
62354
+ * @param event
62355
+ * @param {boolean} [autoActivate]
62356
+ * @param {boolean} [reactivate]
62357
+ */
62197
62358
  HandTool.prototype.activateHand = function(event, autoActivate, reactivate) {
62198
62359
  this._dragging.init(event, 'hand', {
62199
62360
  trapClick: false,
@@ -62624,7 +62785,7 @@
62624
62785
  LassoToolModule,
62625
62786
  HandToolModule,
62626
62787
  GlobalConnectModule,
62627
- translate
62788
+ TranslateModule
62628
62789
  ],
62629
62790
  __init__: [ 'paletteProvider' ],
62630
62791
  paletteProvider: [ 'type', PaletteProvider ]
@@ -63993,6 +64154,7 @@
63993
64154
  * @typedef {import('../../core/EventBus').default} EventBus
63994
64155
  * @typedef {import('../overlays/Overlays').default} Overlays
63995
64156
  * @typedef {import('../selection/Selection').default} Selection
64157
+ * @typedef {import('../../i18n/translate/translate.js').default} Translate
63996
64158
  *
63997
64159
  * @typedef {import('../overlays/Overlays').OverlayAttrs} OverlayAttrs
63998
64160
  *
@@ -64010,8 +64172,9 @@
64010
64172
  * @param {EventBus} eventBus
64011
64173
  * @param {Overlays} overlays
64012
64174
  * @param {Selection} selection
64175
+ * @param {Translate} translate
64013
64176
  */
64014
- function SearchPad(canvas, eventBus, overlays, selection) {
64177
+ function SearchPad(canvas, eventBus, overlays, selection, translate) {
64015
64178
  this._open = false;
64016
64179
  this._results = [];
64017
64180
  this._eventMaps = [];
@@ -64020,9 +64183,10 @@
64020
64183
  this._eventBus = eventBus;
64021
64184
  this._overlays = overlays;
64022
64185
  this._selection = selection;
64186
+ this._translate = translate;
64023
64187
 
64024
64188
  // setup elements
64025
- this._container = domify$1(SearchPad.BOX_HTML);
64189
+ this._container = this._getBoxHtml();
64026
64190
  this._searchInput = query(SearchPad.INPUT_SELECTOR, this._container);
64027
64191
  this._resultsContainer = query(SearchPad.RESULTS_CONTAINER_SELECTOR, this._container);
64028
64192
 
@@ -64038,7 +64202,8 @@
64038
64202
  'canvas',
64039
64203
  'eventBus',
64040
64204
  'overlays',
64041
- 'selection'
64205
+ 'selection',
64206
+ 'translate'
64042
64207
  ];
64043
64208
 
64044
64209
 
@@ -64419,6 +64584,17 @@
64419
64584
  }
64420
64585
  };
64421
64586
 
64587
+ SearchPad.prototype._getBoxHtml = function() {
64588
+ const box = domify$1(SearchPad.BOX_HTML);
64589
+ const input = query(SearchPad.INPUT_SELECTOR, box);
64590
+
64591
+ if (input) {
64592
+ input.setAttribute('aria-label', this._translate('Search in diagram'));
64593
+ }
64594
+
64595
+ return box;
64596
+ };
64597
+
64422
64598
 
64423
64599
  /**
64424
64600
  * Construct overlay object for the given bounding box.
@@ -64525,6 +64701,7 @@
64525
64701
  */
64526
64702
  var SearchPadModule = {
64527
64703
  __depends__: [
64704
+ TranslateModule,
64528
64705
  OverlaysModule,
64529
64706
  SelectionModule
64530
64707
  ],