@lvce-editor/renderer-process 30.13.2 → 30.14.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.
@@ -99,7 +99,7 @@ const writeText = async text => {
99
99
  const toClipboardItem = options => {
100
100
  return new ClipboardItem(options);
101
101
  };
102
- const write$2 = async itemOptions => {
102
+ const write$1 = async itemOptions => {
103
103
  const items = itemOptions.map(toClipboardItem);
104
104
  await navigator.clipboard.write(items);
105
105
  };
@@ -125,7 +125,7 @@ const state$b = {
125
125
  const set$b = (id, sheet) => {
126
126
  state$b.styleSheets[id] = sheet;
127
127
  };
128
- const get$b = id => {
128
+ const get$9 = id => {
129
129
  return state$b.styleSheets[id];
130
130
  };
131
131
  const setText$2 = (id, text) => {
@@ -140,7 +140,7 @@ const remove$5 = id => {
140
140
  };
141
141
 
142
142
  const addCssStyleSheet = (id, text) => {
143
- const existing = get$b(id);
143
+ const existing = get$9(id);
144
144
  if (existing) {
145
145
  existing.replaceSync(text);
146
146
  setText$2(id, text);
@@ -153,7 +153,7 @@ const addCssStyleSheet = (id, text) => {
153
153
  document.adoptedStyleSheets.push(sheet);
154
154
  };
155
155
  const patchCssStyleSheet = (id, start, deleteCount, replacement) => {
156
- const sheet = get$b(id);
156
+ const sheet = get$9(id);
157
157
  const text = getText(id);
158
158
  if (!sheet || typeof text !== 'string') {
159
159
  throw new Error(`stylesheet ${id} must be initialized before it can be patched`);
@@ -172,7 +172,7 @@ const patchCssStyleSheet = (id, start, deleteCount, replacement) => {
172
172
  setText$2(id, newText);
173
173
  };
174
174
  const removeCssStyleSheet = id => {
175
- const sheet = get$b(id);
175
+ const sheet = get$9(id);
176
176
  if (!sheet) {
177
177
  return;
178
178
  }
@@ -336,7 +336,7 @@ const createIdGenerator = () => {
336
336
  return ++id;
337
337
  };
338
338
  };
339
- const create$L = createIdGenerator();
339
+ const create$J = createIdGenerator();
340
340
 
341
341
  const state$a = Object.create(null);
342
342
  const acquire$1 = id => {
@@ -350,7 +350,7 @@ const getFileHandles$1 = async ids => {
350
350
  return handles;
351
351
  };
352
352
  const add$1 = promise => {
353
- const id = create$L();
353
+ const id = create$J();
354
354
  state$a[id] = promise;
355
355
  return id;
356
356
  };
@@ -1264,7 +1264,7 @@ const {
1264
1264
  } = ElementTagMap;
1265
1265
 
1266
1266
  const instances = Object.create(null);
1267
- const get$a = viewletId => {
1267
+ const get$8 = viewletId => {
1268
1268
  return instances[viewletId];
1269
1269
  };
1270
1270
  const set$a = (viewletId, instance) => {
@@ -1299,7 +1299,7 @@ const has$1 = listener => {
1299
1299
  const set$9 = (listener, value) => {
1300
1300
  cache.set(listener, value);
1301
1301
  };
1302
- const get$9 = listener => {
1302
+ const get$7 = listener => {
1303
1303
  return cache.get(listener);
1304
1304
  };
1305
1305
 
@@ -1321,7 +1321,7 @@ const getWrappedListener = (listener, returnValue) => {
1321
1321
  nameAnonymousFunction$1(wrapped, listener.name);
1322
1322
  set$9(listener, wrapped);
1323
1323
  }
1324
- return get$9(listener);
1324
+ return get$7(listener);
1325
1325
  };
1326
1326
 
1327
1327
  const attachedListeners = new WeakMap();
@@ -1555,7 +1555,7 @@ const renderDomElement = (element, eventMap, newEventMap) => {
1555
1555
  return $Element;
1556
1556
  };
1557
1557
  const renderReferenceNode = (element, eventMap, newEventMap) => {
1558
- const instance = get$a(element.uid);
1558
+ const instance = get$8(element.uid);
1559
1559
  if (!instance || !instance.state) {
1560
1560
  return document.createTextNode('Reference node not found');
1561
1561
  }
@@ -1701,7 +1701,7 @@ const handleNavigateSibling = (state, patch, $Element, patchIndex) => {
1701
1701
  return true;
1702
1702
  };
1703
1703
  const handleSetReferenceNodeUid = (state, patch) => {
1704
- const instance = get$a(patch.uid);
1704
+ const instance = get$8(patch.uid);
1705
1705
  if (!instance || !instance.state) {
1706
1706
  console.error('Cannot set reference node uid: instance not found', {
1707
1707
  uid: patch.uid
@@ -1902,7 +1902,7 @@ const rememberFocus$1 = ($Viewlet, dom, eventMap, uid = 0) => {
1902
1902
  return $Viewlet;
1903
1903
  };
1904
1904
 
1905
- const get$8 = ids => {
1905
+ const get$6 = ids => {
1906
1906
  return getFileHandles$1(ids);
1907
1907
  };
1908
1908
 
@@ -2128,7 +2128,7 @@ const getWorkerDisplayName$1 = name => {
2128
2128
  }
2129
2129
  return `${name} worker`;
2130
2130
  };
2131
- const create$K = async ({
2131
+ const create$I = async ({
2132
2132
  name,
2133
2133
  url
2134
2134
  }) => {
@@ -2196,7 +2196,7 @@ const wrap = worker => {
2196
2196
 
2197
2197
  const IpcParentWithModuleWorker$2 = {
2198
2198
  __proto__: null,
2199
- create: create$K,
2199
+ create: create$I,
2200
2200
  wrap
2201
2201
  };
2202
2202
 
@@ -2204,7 +2204,7 @@ const isMessagePort$1 = value => {
2204
2204
  return value instanceof MessagePort;
2205
2205
  };
2206
2206
 
2207
- const create$J = async ({
2207
+ const create$H = async ({
2208
2208
  url
2209
2209
  }) => {
2210
2210
  string(url);
@@ -2228,10 +2228,10 @@ const create$J = async ({
2228
2228
 
2229
2229
  const IpcParentWithMessagePort$2 = {
2230
2230
  __proto__: null,
2231
- create: create$J
2231
+ create: create$H
2232
2232
  };
2233
2233
 
2234
- const create$I = async url => {
2234
+ const create$G = async url => {
2235
2235
  const referencePort = await new Promise(resolve => {
2236
2236
  Object.defineProperty(globalThis, 'acceptReferencePort', {
2237
2237
  configurable: true,
@@ -2245,7 +2245,7 @@ const create$I = async url => {
2245
2245
 
2246
2246
  const IpcParentWithReferencePort = {
2247
2247
  __proto__: null,
2248
- create: create$I
2248
+ create: create$G
2249
2249
  };
2250
2250
 
2251
2251
  const normalizeLine = line => {
@@ -2829,7 +2829,7 @@ const execute = (command, ...args) => {
2829
2829
 
2830
2830
  const Two$1 = '2.0';
2831
2831
  const callbacks = Object.create(null);
2832
- const get$7 = id => {
2832
+ const get$5 = id => {
2833
2833
  return callbacks[id];
2834
2834
  };
2835
2835
  const remove$4 = id => {
@@ -3019,7 +3019,7 @@ const warn = (...args) => {
3019
3019
  console.warn(...args);
3020
3020
  };
3021
3021
  const resolve = (id, response) => {
3022
- const fn = get$7(id);
3022
+ const fn = get$5(id);
3023
3023
  if (!fn) {
3024
3024
  console.log(response);
3025
3025
  warn(`callback ${id} may already be disposed`);
@@ -3082,7 +3082,7 @@ const getErrorResponse = (id, error, preparePrettyError, logError) => {
3082
3082
  const errorProperty = getErrorProperty(error, prettyError);
3083
3083
  return create$1$1(id, errorProperty);
3084
3084
  };
3085
- const create$H = (message, result) => {
3085
+ const create$F = (message, result) => {
3086
3086
  return {
3087
3087
  id: message.id,
3088
3088
  jsonrpc: Two$1,
@@ -3091,7 +3091,7 @@ const create$H = (message, result) => {
3091
3091
  };
3092
3092
  const getSuccessResponse = (message, result) => {
3093
3093
  const resultProperty = result ?? null;
3094
- return create$H(message, resultProperty);
3094
+ return create$F(message, resultProperty);
3095
3095
  };
3096
3096
  const getErrorResponseSimple = (id, error) => {
3097
3097
  return {
@@ -3185,7 +3185,7 @@ const handleJsonRpcMessage = async (...args) => {
3185
3185
 
3186
3186
  const Two = '2.0';
3187
3187
 
3188
- const create$G = (method, params) => {
3188
+ const create$E = (method, params) => {
3189
3189
  return {
3190
3190
  jsonrpc: Two,
3191
3191
  method,
@@ -3193,7 +3193,7 @@ const create$G = (method, params) => {
3193
3193
  };
3194
3194
  };
3195
3195
 
3196
- const create$F = (id, method, params) => {
3196
+ const create$D = (id, method, params) => {
3197
3197
  const message = {
3198
3198
  id,
3199
3199
  jsonrpc: Two,
@@ -3204,12 +3204,12 @@ const create$F = (id, method, params) => {
3204
3204
  };
3205
3205
 
3206
3206
  let id = 0;
3207
- const create$E = () => {
3207
+ const create$C = () => {
3208
3208
  return ++id;
3209
3209
  };
3210
3210
 
3211
3211
  const registerPromise = map => {
3212
- const id = create$E();
3212
+ const id = create$C();
3213
3213
  const {
3214
3214
  promise,
3215
3215
  resolve
@@ -3226,7 +3226,7 @@ const invokeHelper = async (callbacks, ipc, method, params, useSendAndTransfer)
3226
3226
  id,
3227
3227
  promise
3228
3228
  } = registerPromise(callbacks);
3229
- const message = create$F(id, method, params);
3229
+ const message = create$D(id, method, params);
3230
3230
  if (useSendAndTransfer && ipc.sendAndTransfer) {
3231
3231
  ipc.sendAndTransfer(message);
3232
3232
  } else {
@@ -3262,7 +3262,7 @@ const createRpc = ipc => {
3262
3262
  * @deprecated
3263
3263
  */
3264
3264
  send(method, ...params) {
3265
- const message = create$G(method, params);
3265
+ const message = create$E(method, params);
3266
3266
  ipc.send(message);
3267
3267
  }
3268
3268
  };
@@ -3301,7 +3301,7 @@ const unhandleIpc = ipc => {
3301
3301
  }
3302
3302
  };
3303
3303
 
3304
- const create$D = async ({
3304
+ const create$B = async ({
3305
3305
  commandMap,
3306
3306
  window
3307
3307
  }) => {
@@ -3313,7 +3313,7 @@ const create$D = async ({
3313
3313
  return rpc;
3314
3314
  };
3315
3315
 
3316
- const create$C = async ({
3316
+ const create$A = async ({
3317
3317
  commandMap,
3318
3318
  isMessagePortOpen = true,
3319
3319
  messagePort
@@ -3335,7 +3335,7 @@ const isWorker = value => {
3335
3335
  return value instanceof Worker;
3336
3336
  };
3337
3337
 
3338
- const create$B = async ({
3338
+ const create$z = async ({
3339
3339
  commandMap,
3340
3340
  name,
3341
3341
  url
@@ -3355,7 +3355,7 @@ const create$B = async ({
3355
3355
  return workerRpc;
3356
3356
  };
3357
3357
 
3358
- const create$A = async ({
3358
+ const create$y = async ({
3359
3359
  commandMap,
3360
3360
  name,
3361
3361
  port,
@@ -3378,11 +3378,11 @@ const create$A = async ({
3378
3378
  return workerRpc;
3379
3379
  };
3380
3380
 
3381
- const create$z = async ({
3381
+ const create$x = async ({
3382
3382
  commandMap,
3383
3383
  messagePort
3384
3384
  }) => {
3385
- return create$C({
3385
+ return create$A({
3386
3386
  commandMap,
3387
3387
  messagePort
3388
3388
  });
@@ -3398,13 +3398,13 @@ const remove$3 = id => {
3398
3398
  return worker;
3399
3399
  };
3400
3400
 
3401
- const create$y = async ({
3401
+ const create$w = async ({
3402
3402
  id,
3403
3403
  name,
3404
3404
  port,
3405
3405
  raw,
3406
3406
  url
3407
- }, createRpc = create$A) => {
3407
+ }, createRpc = create$y) => {
3408
3408
  const rpc = await createRpc({
3409
3409
  commandMap: {},
3410
3410
  name,
@@ -3420,7 +3420,7 @@ const create$y = async ({
3420
3420
 
3421
3421
  const IpcParentWithModuleWorkerWithMessagePort = {
3422
3422
  __proto__: null,
3423
- create: create$y
3423
+ create: create$w
3424
3424
  };
3425
3425
 
3426
3426
  const Web = 1;
@@ -3453,7 +3453,7 @@ const platform = getPlatform();
3453
3453
  const isElectron = platform === Electron;
3454
3454
 
3455
3455
  // TODO use handleIncomingIpc function
3456
- const create$x = async ({
3456
+ const create$v = async ({
3457
3457
  ipcId,
3458
3458
  port
3459
3459
  }) => {
@@ -3461,7 +3461,7 @@ const create$x = async ({
3461
3461
  if (!isElectron) {
3462
3462
  throw new Error('Electron api was requested but is not available');
3463
3463
  }
3464
- const rpc = await create$D({
3464
+ const rpc = await create$B({
3465
3465
  commandMap: {},
3466
3466
  window
3467
3467
  });
@@ -3471,7 +3471,7 @@ const create$x = async ({
3471
3471
 
3472
3472
  const IpcParentWithElectron = {
3473
3473
  __proto__: null,
3474
- create: create$x
3474
+ create: create$v
3475
3475
  };
3476
3476
 
3477
3477
  const getModule = method => {
@@ -3495,7 +3495,7 @@ const ipcs = Object.create(null);
3495
3495
  const set$7 = (name, ipc) => {
3496
3496
  ipcs[name] = ipc;
3497
3497
  };
3498
- const get$6 = name => {
3498
+ const get$4 = name => {
3499
3499
  return ipcs[name];
3500
3500
  };
3501
3501
  const remove$2 = name => {
@@ -3528,7 +3528,7 @@ const launchWorker = async ({
3528
3528
  url
3529
3529
  }) => {
3530
3530
  try {
3531
- const rpc = await create$B({
3531
+ const rpc = await create$z({
3532
3532
  commandMap: commandMapRef,
3533
3533
  name,
3534
3534
  url
@@ -3710,7 +3710,7 @@ const hydrate$3 = async () => {
3710
3710
  };
3711
3711
 
3712
3712
  // TODO needed?
3713
- const dispose$k = () => {
3713
+ const dispose$j = () => {
3714
3714
  if (state$7.rpc) {
3715
3715
  state$7.rpc.dispose();
3716
3716
  }
@@ -3740,7 +3740,7 @@ const invokeAndTransfer = (method, ...params) => {
3740
3740
 
3741
3741
  const RendererWorker = {
3742
3742
  __proto__: null,
3743
- dispose: dispose$k,
3743
+ dispose: dispose$j,
3744
3744
  hydrate: hydrate$3,
3745
3745
  invoke: invoke$1,
3746
3746
  invokeAndTransfer,
@@ -3749,7 +3749,7 @@ const RendererWorker = {
3749
3749
  state: state$7
3750
3750
  };
3751
3751
 
3752
- const create$w = async ({
3752
+ const create$u = async ({
3753
3753
  method,
3754
3754
  ...options
3755
3755
  }) => {
@@ -3759,7 +3759,7 @@ const create$w = async ({
3759
3759
  }
3760
3760
  // TODO rename method
3761
3761
  // TODO avoid cyclic dependency
3762
- const port = get$6(options.name);
3762
+ const port = get$4(options.name);
3763
3763
  remove$2(options.name);
3764
3764
  await invokeAndTransfer('Transferrable.transfer', options.id, port);
3765
3765
  return;
@@ -3768,7 +3768,7 @@ const create$w = async ({
3768
3768
  // @ts-ignore
3769
3769
  return module.create(options);
3770
3770
  };
3771
- const dispose$j = id => {
3771
+ const dispose$i = id => {
3772
3772
  const worker = remove$3(id);
3773
3773
  worker?.terminate();
3774
3774
  };
@@ -3874,7 +3874,7 @@ const create$Notification = message => {
3874
3874
  $Notification.textContent = message;
3875
3875
  return $Notification;
3876
3876
  };
3877
- const create$v = (type, message) => {
3877
+ const create$t = (type, message) => {
3878
3878
  // TODO this pattern might be also useful for activitybar, sidebar etc., creating elements as late as possible, only when actually needed
3879
3879
  const $Notification = create$Notification(message);
3880
3880
  append$1($Notification);
@@ -3919,24 +3919,18 @@ const createWithOptions = (type, message, options) => {
3919
3919
  const $Notification = create$NotificationWithOptions(message, options);
3920
3920
  append$1($Notification);
3921
3921
  };
3922
- const dispose$i = id => {
3922
+ const dispose$h = id => {
3923
3923
  // const $Notification = state.$Notifications
3924
3924
  };
3925
3925
 
3926
3926
  const state$5 = {
3927
3927
  canvasObjects: Object.create(null)
3928
3928
  };
3929
- const get$5 = id => {
3930
- return state$5.canvasObjects[id];
3931
- };
3932
3929
  const set$6 = (canvasId, canvas) => {
3933
3930
  state$5.canvasObjects[canvasId] = canvas;
3934
3931
  };
3935
3932
 
3936
- const get$4 = id => {
3937
- return get$5(id);
3938
- };
3939
- const create$u = async (canvasId, objectId) => {
3933
+ const create$s = async (canvasId, objectId) => {
3940
3934
  const canvas = document.createElement('canvas');
3941
3935
  const offscreenCanvas = canvas.transferControlToOffscreen();
3942
3936
  set$6(canvasId, canvas);
@@ -4056,7 +4050,7 @@ const getElement = () => {
4056
4050
  return state$4.$PreviousFocusElement;
4057
4051
  };
4058
4052
 
4059
- const focus$e = $Element => {
4053
+ const focus$d = $Element => {
4060
4054
  if ($Element === document.activeElement) {
4061
4055
  return;
4062
4056
  }
@@ -4155,7 +4149,7 @@ const getLevel = $Menu => {
4155
4149
  // @ts-expect-error
4156
4150
  return state$3.$$Menus.indexOf($Menu);
4157
4151
  };
4158
- const handleMouseDown$4 = event => {
4152
+ const handleMouseDown$2 = event => {
4159
4153
  const $Target = event.target;
4160
4154
  const $Menu = $Target.closest('.Menu');
4161
4155
  const index = findIndex($Menu, $Target);
@@ -4218,7 +4212,7 @@ const handleMouseLeave = event => {
4218
4212
  };
4219
4213
 
4220
4214
  // const handleBlur = (event) => {}
4221
- const handleKeyDown$5 = event => {
4215
+ const handleKeyDown$4 = event => {
4222
4216
  state$3.handleKeyDown(event);
4223
4217
  };
4224
4218
  const handleFocusOut$1 = event => {
@@ -4232,7 +4226,7 @@ const create$Menu$1 = () => {
4232
4226
  $Menu.tabIndex = -1;
4233
4227
  // $ContextMenu.onmousedown = contextMenuHandleMouseDown
4234
4228
  // TODO mousedown vs click? (click is usually better but mousedown is faster, why wait 100ms?)
4235
- $Menu.addEventListener(MouseDown, handleMouseDown$4);
4229
+ $Menu.addEventListener(MouseDown, handleMouseDown$2);
4236
4230
  $Menu.addEventListener(MouseEnter, handleMouseEnter, {
4237
4231
  capture: true
4238
4232
  });
@@ -4242,7 +4236,7 @@ const create$Menu$1 = () => {
4242
4236
  // $Menu.addEventListener('mousemove', handleMouseMove, {
4243
4237
  // passive: true,
4244
4238
  // })
4245
- $Menu.onkeydown = handleKeyDown$5;
4239
+ $Menu.onkeydown = handleKeyDown$4;
4246
4240
  $Menu.addEventListener(FocusOut, handleFocusOut$1);
4247
4241
  $Menu.oncontextmenu = handleContextMenu$7;
4248
4242
  // $ContextMenu.onfocus = handleFocus
@@ -4305,7 +4299,7 @@ const showMenu = (x, y, width, height, items, level, parentIndex = -1, dom = [],
4305
4299
  state$3.$$Menus.push($Menu);
4306
4300
  append$1($Menu);
4307
4301
  if (level === 0) {
4308
- focus$e($Menu);
4302
+ focus$d($Menu);
4309
4303
  send('Focus.setFocus', FocusMenu);
4310
4304
  }
4311
4305
  };
@@ -4570,6 +4564,7 @@ const hover = (element, options) => {
4570
4564
  mouseEvent(element, MouseEnter, options);
4571
4565
  };
4572
4566
  const type = (element, options) => {
4567
+ element.focus();
4573
4568
  element.value = options.text;
4574
4569
  const event = new InputEvent('input', {
4575
4570
  bubbles: true,
@@ -4920,27 +4915,37 @@ const getKeyboardOptions = options => {
4920
4915
  const isXtermTextArea = element => {
4921
4916
  return element instanceof HTMLTextAreaElement && element.classList.contains('xterm-helper-textarea');
4922
4917
  };
4923
- const getPrintableKey = options => {
4924
- if (options.key === 'Space') {
4925
- return ' ';
4926
- }
4927
- if (options.key?.length === 1) {
4928
- return options.key;
4918
+ const getXtermInput = options => {
4919
+ switch (options.key) {
4920
+ case 'Backspace':
4921
+ return '\u{7F}';
4922
+ case 'Enter':
4923
+ return '\r';
4924
+ case 'Escape':
4925
+ return '\u{1B}';
4926
+ case 'Space':
4927
+ return ' ';
4928
+ case 'Tab':
4929
+ return '\t';
4930
+ default:
4931
+ if (options.key?.length === 1) {
4932
+ return options.key;
4933
+ }
4934
+ return '';
4929
4935
  }
4930
- return '';
4931
4936
  };
4932
4937
  const press = options => {
4933
4938
  const element = document.activeElement;
4934
4939
  if (!element) {
4935
4940
  return;
4936
4941
  }
4937
- const text = getPrintableKey(options);
4938
- if (isXtermTextArea(element) && text) {
4939
- element.value = text;
4942
+ const input = getXtermInput(options);
4943
+ if (isXtermTextArea(element) && input) {
4944
+ element.value = input;
4940
4945
  element.dispatchEvent(new InputEvent('input', {
4941
4946
  bubbles: true,
4942
4947
  cancelable: true,
4943
- data: text,
4948
+ data: input,
4944
4949
  inputType: 'insertText'
4945
4950
  }));
4946
4951
  element.value = '';
@@ -5272,7 +5277,7 @@ const showError = (message, y, x) => {
5272
5277
  $ImagePreviewImage
5273
5278
  };
5274
5279
  };
5275
- const create$t = (uri, top, left) => {
5280
+ const create$r = (uri, top, left) => {
5276
5281
  const $ImagePreviewImage = document.createElement('img');
5277
5282
  $ImagePreviewImage.className = 'ImagePreviewImage';
5278
5283
  $ImagePreviewImage.src = uri;
@@ -5297,14 +5302,14 @@ const create$t = (uri, top, left) => {
5297
5302
  const update = (state, uri) => {
5298
5303
  state.$ImagePreviewImage.uri = uri;
5299
5304
  };
5300
- const dispose$h = state => {
5305
+ const dispose$g = state => {
5301
5306
  remove$1(state.$ImagePreview);
5302
5307
  };
5303
5308
 
5304
5309
  const ImagePreview$1 = {
5305
5310
  __proto__: null,
5306
- create: create$t,
5307
- dispose: dispose$h,
5311
+ create: create$r,
5312
+ dispose: dispose$g,
5308
5313
  showError,
5309
5314
  update
5310
5315
  };
@@ -5320,7 +5325,7 @@ const getNodeIndex = $Node => {
5320
5325
  const get$ItemFromEvent = event => {
5321
5326
  return event.target.closest?.('.ActivityBarItem');
5322
5327
  };
5323
- const handleMouseDown$3 = event => {
5328
+ const handleMouseDown$1 = event => {
5324
5329
  const {
5325
5330
  button,
5326
5331
  clientX,
@@ -5335,7 +5340,7 @@ const handleMouseDown$3 = event => {
5335
5340
  const index = getNodeIndex($Item);
5336
5341
  return ['handleClickIndex', button, index, clientX, clientY];
5337
5342
  };
5338
- const handleBlur$8 = () => {
5343
+ const handleBlur$7 = () => {
5339
5344
  return ['handleBlur'];
5340
5345
  };
5341
5346
  const handleFocus$8 = () => {
@@ -5357,10 +5362,10 @@ const returnValue$8 = true;
5357
5362
 
5358
5363
  const ViewletActivityBarEvents = {
5359
5364
  __proto__: null,
5360
- handleBlur: handleBlur$8,
5365
+ handleBlur: handleBlur$7,
5361
5366
  handleContextMenu: handleContextMenu$6,
5362
5367
  handleFocus: handleFocus$8,
5363
- handleMouseDown: handleMouseDown$3,
5368
+ handleMouseDown: handleMouseDown$1,
5364
5369
  returnValue: returnValue$8
5365
5370
  };
5366
5371
 
@@ -5405,7 +5410,7 @@ forwardViewletCommand('focusPrevious');
5405
5410
  const handleAudioError$1 = forwardViewletCommand('handleAudioError');
5406
5411
  forwardViewletCommand('handleBeforeInput');
5407
5412
  forwardViewletCommand('handleBeforeInputFromContentEditable');
5408
- const handleBlur$7 = forwardViewletCommand('handleBlur');
5413
+ const handleBlur$6 = forwardViewletCommand('handleBlur');
5409
5414
  const handleButtonClick = forwardViewletCommand('handleButtonClick');
5410
5415
  const handleClick$6 = forwardViewletCommand('handleClick');
5411
5416
  const handleClickAction$2 = forwardViewletCommand('handleClickAction');
@@ -5438,12 +5443,12 @@ const handleFocusIn$4 = forwardViewletCommand('handleFocusIn');
5438
5443
  forwardViewletCommand('handleIconError');
5439
5444
  const handleImageError = forwardViewletCommand('handleImageError');
5440
5445
  const handleInput$6 = forwardViewletCommand('handleInput');
5441
- const handleKeyDown$4 = forwardViewletCommand('handleKeyDown');
5446
+ const handleKeyDown$3 = forwardViewletCommand('handleKeyDown');
5442
5447
  forwardViewletCommand('handleListBlur');
5443
5448
  forwardViewletCommand('handleListFocus');
5444
5449
  const handleMenuClick$1 = forwardViewletCommand('handleMenuClick');
5445
5450
  const handleMenuMouseOver$1 = forwardViewletCommand('handleMenuMouseOver');
5446
- const handleMouseDown$2 = forwardViewletCommand('handleMouseDown');
5451
+ forwardViewletCommand('handleMouseDown');
5447
5452
  forwardViewletCommand('handleMouseMove');
5448
5453
  const handleMouseOut$1 = forwardViewletCommand('handleMouseOut');
5449
5454
  const handleMouseOver$1 = forwardViewletCommand('handleMouseOver');
@@ -5522,15 +5527,15 @@ const ViewletAudio = {
5522
5527
  Events: Events$4
5523
5528
  };
5524
5529
 
5525
- const create$s = () => {
5530
+ const create$q = () => {
5526
5531
  const $Viewlet = document.createElement('div');
5527
5532
  $Viewlet.className = 'Viewlet Clock';
5528
5533
  return {
5529
5534
  $Viewlet
5530
5535
  };
5531
5536
  };
5532
- const dispose$g = state => {};
5533
- const refresh$4 = () => {};
5537
+ const dispose$f = state => {};
5538
+ const refresh$3 = () => {};
5534
5539
  const setTime = (state, time) => {
5535
5540
  object(state);
5536
5541
  string(time);
@@ -5539,9 +5544,9 @@ const setTime = (state, time) => {
5539
5544
 
5540
5545
  const ViewletClock = {
5541
5546
  __proto__: null,
5542
- create: create$s,
5543
- dispose: dispose$g,
5544
- refresh: refresh$4,
5547
+ create: create$q,
5548
+ dispose: dispose$f,
5549
+ refresh: refresh$3,
5545
5550
  setTime
5546
5551
  };
5547
5552
 
@@ -5568,7 +5573,7 @@ const stopTracking$1 = ($Target, pointerId, handlePointerMove, handlePointerUp)
5568
5573
  // TODO use pointerlost event instead
5569
5574
  $Target.removeEventListener(PointerUp, handlePointerUp);
5570
5575
  };
5571
- const create$r = (pointerDown, pointerMove, pointerUp) => {
5576
+ const create$p = (pointerDown, pointerMove, pointerUp) => {
5572
5577
  const shared = (fn, event) => {
5573
5578
  const message = fn(event);
5574
5579
  if (!message || message.length === 0) {
@@ -5601,7 +5606,7 @@ const create$r = (pointerDown, pointerMove, pointerUp) => {
5601
5606
  };
5602
5607
 
5603
5608
  const handleOffset = 20;
5604
- const handleSliderPointerDown = create$r(event => {
5609
+ const handleSliderPointerDown = create$p(event => {
5605
5610
  const {
5606
5611
  clientX,
5607
5612
  clientY
@@ -5683,7 +5688,7 @@ const ViewletDebugConsoleEvents = {
5683
5688
  handleInput: handleInput$5
5684
5689
  };
5685
5690
 
5686
- const create$q = () => {
5691
+ const create$o = () => {
5687
5692
  const $Viewlet = document.createElement('div');
5688
5693
  $Viewlet.className = 'Viewlet DebugConsole';
5689
5694
  return {
@@ -5699,11 +5704,11 @@ const setDom$9 = (state, dom) => {
5699
5704
 
5700
5705
  const ViewletDebugConsole = {
5701
5706
  __proto__: null,
5702
- create: create$q,
5707
+ create: create$o,
5703
5708
  setDom: setDom$9
5704
5709
  };
5705
5710
 
5706
- const handleKeyDown$3 = event => {
5711
+ const handleKeyDown$2 = event => {
5707
5712
  preventDefault(event);
5708
5713
  stopPropagation(event);
5709
5714
  const uid = fromEvent(event);
@@ -5714,17 +5719,17 @@ const handleKeyDown$3 = event => {
5714
5719
  metaKey,
5715
5720
  shiftKey
5716
5721
  } = event;
5717
- handleKeyDown$4(uid, key, altKey, ctrlKey, shiftKey, metaKey);
5722
+ handleKeyDown$3(uid, key, altKey, ctrlKey, shiftKey, metaKey);
5718
5723
  };
5719
- const handleBlur$6 = event => {
5724
+ const handleBlur$5 = event => {
5720
5725
  const uid = fromEvent(event);
5721
- handleBlur$7(uid);
5726
+ handleBlur$6(uid);
5722
5727
  };
5723
5728
 
5724
5729
  const ViewletDefineKeyBindingEvents = {
5725
5730
  __proto__: null,
5726
- handleBlur: handleBlur$6,
5727
- handleKeyDown: handleKeyDown$3
5731
+ handleBlur: handleBlur$5,
5732
+ handleKeyDown: handleKeyDown$2
5728
5733
  };
5729
5734
 
5730
5735
  const setValue$2 = (state, value) => {
@@ -5736,7 +5741,7 @@ const setValue$2 = (state, value) => {
5736
5741
  const $Input = $Viewlet.querySelector(':scope input');
5737
5742
  $Input.value = value;
5738
5743
  };
5739
- const focus$d = state => {
5744
+ const focus$c = state => {
5740
5745
  const {
5741
5746
  $Viewlet
5742
5747
  } = state;
@@ -5747,7 +5752,7 @@ const focus$d = state => {
5747
5752
  const ViewletDefineKeyBinding = {
5748
5753
  __proto__: null,
5749
5754
  Events: ViewletDefineKeyBindingEvents,
5750
- focus: focus$d,
5755
+ focus: focus$c,
5751
5756
  setValue: setValue$2
5752
5757
  };
5753
5758
 
@@ -5760,7 +5765,7 @@ const setMaskImage = ($Element, icon) => {
5760
5765
  }
5761
5766
  };
5762
5767
 
5763
- const create$p = icon => {
5768
+ const create$n = icon => {
5764
5769
  const $Icon = document.createElement('div');
5765
5770
  $Icon.className = 'MaskIcon';
5766
5771
  setMaskImage($Icon, icon);
@@ -5770,7 +5775,7 @@ const create$p = icon => {
5770
5775
 
5771
5776
  const create$Button = (label, icon) => {
5772
5777
  // TODO icon div might not be needed (unnecessary HTML element)
5773
- const $Icon = create$p(icon);
5778
+ const $Icon = create$n(icon);
5774
5779
  const $Button = document.createElement('button');
5775
5780
  $Button.className = 'IconButton';
5776
5781
  $Button.title = label;
@@ -5791,7 +5796,7 @@ const handleClick$4 = event => {
5791
5796
  handleClick$5(index);
5792
5797
  };
5793
5798
 
5794
- const create$o = () => {
5799
+ const create$m = () => {
5795
5800
  const $DialogTitle = document.createElement('h2');
5796
5801
  $DialogTitle.id = 'DialogTitle';
5797
5802
  const $DialogCloseButton = create$Button('Close', 'Close');
@@ -5872,7 +5877,7 @@ const setErrorStack = (state, errorStack) => {
5872
5877
 
5873
5878
  const ViewletDialog = {
5874
5879
  __proto__: null,
5875
- create: create$o,
5880
+ create: create$m,
5876
5881
  postAppend,
5877
5882
  setButtons,
5878
5883
  setCodeFrame,
@@ -5935,7 +5940,7 @@ const handleContextMenu$4 = event => {
5935
5940
  } = event;
5936
5941
  return ['handleContextMenu', button, clientX, clientY];
5937
5942
  };
5938
- const handleSashCornerPointerDown = create$r(event => {
5943
+ const handleSashCornerPointerDown = create$p(event => {
5939
5944
  const {
5940
5945
  clientX,
5941
5946
  clientY
@@ -6109,15 +6114,15 @@ const handleFocusIn$3 = event => {
6109
6114
  const uid = fromEvent(event);
6110
6115
  handleFocusIn$4(uid);
6111
6116
  };
6112
- const handleBlur$5 = event => {
6117
+ const handleBlur$4 = event => {
6113
6118
  preventDefault(event);
6114
6119
  const uid = fromEvent(event);
6115
- handleBlur$7(uid);
6120
+ handleBlur$6(uid);
6116
6121
  };
6117
6122
 
6118
6123
  const ViewletEditorCodeGeneratorEvents = {
6119
6124
  __proto__: null,
6120
- handleBlur: handleBlur$5,
6125
+ handleBlur: handleBlur$4,
6121
6126
  handleFocusIn: handleFocusIn$3
6122
6127
  };
6123
6128
 
@@ -6134,10 +6139,10 @@ const appendWidget$5 = state => {
6134
6139
  } = state;
6135
6140
  append$1($Viewlet);
6136
6141
  };
6137
- const dispose$f = state => {
6142
+ const dispose$e = state => {
6138
6143
  remove$1(state.$Viewlet);
6139
6144
  };
6140
- const focus$c = (state, key, source) => {
6145
+ const focus$b = (state, key, source) => {
6141
6146
  if (!key) {
6142
6147
  return;
6143
6148
  }
@@ -6160,8 +6165,8 @@ const ViewletEditorCodeGenerator = {
6160
6165
  __proto__: null,
6161
6166
  Events: ViewletEditorCodeGeneratorEvents,
6162
6167
  appendWidget: appendWidget$5,
6163
- dispose: dispose$f,
6164
- focus: focus$c,
6168
+ dispose: dispose$e,
6169
+ focus: focus$b,
6165
6170
  setBounds: setBounds$9
6166
6171
  };
6167
6172
 
@@ -6278,7 +6283,7 @@ const setNegativeMargin = (state, negativeMargin) => {
6278
6283
  setTop($ListItems, negativeMargin);
6279
6284
  };
6280
6285
 
6281
- const create$n = () => {
6286
+ const create$l = () => {
6282
6287
  const $ListItems = document.createElement('div');
6283
6288
  $ListItems.className = 'ListItems';
6284
6289
  $ListItems.role = ListBox;
@@ -6331,7 +6336,7 @@ const setDom$8 = (state, dom) => {
6331
6336
  // TODO recycle nodes
6332
6337
  // TODO set right aria attributes on $EditorInput
6333
6338
  };
6334
- const dispose$e = state => {
6339
+ const dispose$d = state => {
6335
6340
  remove$1(state.$Viewlet);
6336
6341
  // state.$EditorInput.removeAttribute('aria-activedescendant')
6337
6342
  };
@@ -6362,8 +6367,8 @@ const setBounds$8 = (state, x, y, width, height) => {
6362
6367
  const ViewletEditorCompletion = {
6363
6368
  __proto__: null,
6364
6369
  attachEvents: attachEvents$6,
6365
- create: create$n,
6366
- dispose: dispose$e,
6370
+ create: create$l,
6371
+ dispose: dispose$d,
6367
6372
  handleError: handleError$5,
6368
6373
  setBounds: setBounds$8,
6369
6374
  setContentHeight,
@@ -6385,7 +6390,7 @@ const ViewletEditorCompletionDetailsEvents = {
6385
6390
  returnValue: returnValue$4
6386
6391
  };
6387
6392
 
6388
- const create$m = () => {
6393
+ const create$k = () => {
6389
6394
  const $Viewlet = document.createElement('div');
6390
6395
  $Viewlet.className = 'Viewlet EditorCompletionDetails';
6391
6396
  $Viewlet.id = 'CompletionsDetails';
@@ -6411,7 +6416,7 @@ const appendWidget$4 = state => {
6411
6416
  } = state;
6412
6417
  append$1($Viewlet);
6413
6418
  };
6414
- const dispose$d = state => {
6419
+ const dispose$c = state => {
6415
6420
  remove$1(state.$Viewlet);
6416
6421
  };
6417
6422
  const setBounds$7 = (state, x, y, width, height) => {
@@ -6426,8 +6431,8 @@ const ViewletEditorCompletionDetails = {
6426
6431
  Events: ViewletEditorCompletionDetailsEvents,
6427
6432
  appendWidget: appendWidget$4,
6428
6433
  attachEvents: attachEvents$5,
6429
- create: create$m,
6430
- dispose: dispose$d,
6434
+ create: create$k,
6435
+ dispose: dispose$c,
6431
6436
  setBounds: setBounds$7,
6432
6437
  setDom: setDom$7
6433
6438
  };
@@ -6445,7 +6450,7 @@ const ViewletEditorCompletionDetails = {
6445
6450
 
6446
6451
  // TODO aria alert
6447
6452
 
6448
- const create$l = () => {
6453
+ const create$j = () => {
6449
6454
  const $Viewlet = document.createElement('div');
6450
6455
  $Viewlet.className = 'Viewlet EditorError';
6451
6456
  return {
@@ -6467,13 +6472,13 @@ const setBounds$6 = (state, x, y, width, height) => {
6467
6472
 
6468
6473
  const ViewletEditorError = {
6469
6474
  __proto__: null,
6470
- create: create$l,
6475
+ create: create$j,
6471
6476
  setBounds: setBounds$6,
6472
6477
  setDom: setDom$6
6473
6478
  };
6474
6479
 
6475
6480
  const returnValue$3 = true;
6476
- const handleSashPointerDown$2 = create$r(event => {
6481
+ const handleSashPointerDown$2 = create$p(event => {
6477
6482
  const {
6478
6483
  clientX,
6479
6484
  clientY
@@ -6625,7 +6630,7 @@ const handleFocus$5 = event => {
6625
6630
  handleFocus$7(uid);
6626
6631
  };
6627
6632
 
6628
- const create$k = () => {
6633
+ const create$i = () => {
6629
6634
  const $Viewlet = document.createElement('div');
6630
6635
  $Viewlet.className = 'Viewlet EditorImage';
6631
6636
  return {
@@ -6668,13 +6673,13 @@ const setDom$4 = (state, dom) => {
6668
6673
  const ViewletEditorImage = {
6669
6674
  __proto__: null,
6670
6675
  attachEvents: attachEvents$4,
6671
- create: create$k,
6676
+ create: create$i,
6672
6677
  setDom: setDom$4,
6673
6678
  setDragging,
6674
6679
  setTransform
6675
6680
  };
6676
6681
 
6677
- const create$j = () => {
6682
+ const create$h = () => {
6678
6683
  const $Viewlet = document.createElement('div');
6679
6684
  $Viewlet.className = 'Viewlet EditorText';
6680
6685
  $Viewlet.textContent = 'loading...';
@@ -6682,8 +6687,8 @@ const create$j = () => {
6682
6687
  $Viewlet
6683
6688
  };
6684
6689
  };
6685
- const dispose$c = state => {};
6686
- const refresh$3 = (state, context) => {
6690
+ const dispose$b = state => {};
6691
+ const refresh$2 = (state, context) => {
6687
6692
  object(state);
6688
6693
  string(context.content);
6689
6694
  state.$Viewlet.textContent = context.content;
@@ -6691,9 +6696,9 @@ const refresh$3 = (state, context) => {
6691
6696
 
6692
6697
  const ViewletEditorPlainText = {
6693
6698
  __proto__: null,
6694
- create: create$j,
6695
- dispose: dispose$c,
6696
- refresh: refresh$3
6699
+ create: create$h,
6700
+ dispose: dispose$b,
6701
+ refresh: refresh$2
6697
6702
  };
6698
6703
 
6699
6704
  const handleFocusIn$2 = event => {
@@ -6720,7 +6725,7 @@ const appendWidget$2 = state => {
6720
6725
  } = state;
6721
6726
  append$1($Viewlet);
6722
6727
  };
6723
- const dispose$b = state => {
6728
+ const dispose$a = state => {
6724
6729
  remove$1(state.$Viewlet);
6725
6730
  };
6726
6731
 
@@ -6728,11 +6733,11 @@ const ViewletEditorSourceActions = {
6728
6733
  __proto__: null,
6729
6734
  Events: ViewletEditorSourceActionsEvents,
6730
6735
  appendWidget: appendWidget$2,
6731
- dispose: dispose$b,
6736
+ dispose: dispose$a,
6732
6737
  setBounds: setBounds$4
6733
6738
  };
6734
6739
 
6735
- const create$i = () => {
6740
+ const create$g = () => {
6736
6741
  const $Viewlet = document.createElement('div');
6737
6742
  $Viewlet.className = 'Viewlet EditorTextError';
6738
6743
  return {
@@ -6748,11 +6753,11 @@ const setMessage$3 = (state, message) => {
6748
6753
 
6749
6754
  const ViewletEditorTextError = {
6750
6755
  __proto__: null,
6751
- create: create$i,
6756
+ create: create$g,
6752
6757
  setMessage: setMessage$3
6753
6758
  };
6754
6759
 
6755
- const create$h = () => {
6760
+ const create$f = () => {
6756
6761
  const $Viewlet = document.createElement('div');
6757
6762
  $Viewlet.className = 'Viewlet EditorWidgetError EditorOverlayMessage';
6758
6763
  return {
@@ -6775,12 +6780,12 @@ const setBounds$3 = (state, x, y, width, height) => {
6775
6780
 
6776
6781
  const ViewletEditorWidgetError = {
6777
6782
  __proto__: null,
6778
- create: create$h,
6783
+ create: create$f,
6779
6784
  setBounds: setBounds$3,
6780
6785
  setMessage: setMessage$2
6781
6786
  };
6782
6787
 
6783
- const create$g = () => {
6788
+ const create$e = () => {
6784
6789
  const $Viewlet = document.createElement('div');
6785
6790
  $Viewlet.dataset.viewlet = 'Empty';
6786
6791
  $Viewlet.className = 'Viewlet';
@@ -6788,19 +6793,19 @@ const create$g = () => {
6788
6793
  $Viewlet
6789
6794
  };
6790
6795
  };
6791
- const refresh$2 = (state, context) => {};
6792
- const focus$b = state => {};
6793
- const dispose$a = state => {};
6796
+ const refresh$1 = (state, context) => {};
6797
+ const focus$a = state => {};
6798
+ const dispose$9 = state => {};
6794
6799
 
6795
6800
  const ViewletEmpty = {
6796
6801
  __proto__: null,
6797
- create: create$g,
6798
- dispose: dispose$a,
6799
- focus: focus$b,
6800
- refresh: refresh$2
6802
+ create: create$e,
6803
+ dispose: dispose$9,
6804
+ focus: focus$a,
6805
+ refresh: refresh$1
6801
6806
  };
6802
6807
 
6803
- const create$f = () => {
6808
+ const create$d = () => {
6804
6809
  const $Viewlet = document.createElement('div');
6805
6810
  $Viewlet.className = 'Viewlet EmptyEditor';
6806
6811
  return {
@@ -6810,10 +6815,10 @@ const create$f = () => {
6810
6815
 
6811
6816
  const ViewletEmptyEditor = {
6812
6817
  __proto__: null,
6813
- create: create$f
6818
+ create: create$d
6814
6819
  };
6815
6820
 
6816
- const create$e = () => {
6821
+ const create$c = () => {
6817
6822
  const $Viewlet = document.createElement('div');
6818
6823
  $Viewlet.className = 'Viewlet Error';
6819
6824
  return {
@@ -6829,7 +6834,7 @@ const setMessage$1 = (state, message) => {
6829
6834
 
6830
6835
  const ViewletError = {
6831
6836
  __proto__: null,
6832
- create: create$e,
6837
+ create: create$c,
6833
6838
  setMessage: setMessage$1
6834
6839
  };
6835
6840
 
@@ -6982,7 +6987,7 @@ const ViewletFindWidgetEvents = {
6982
6987
  returnValue: returnValue$2
6983
6988
  };
6984
6989
 
6985
- const create$d = () => {
6990
+ const create$b = () => {
6986
6991
  const $Viewlet = document.createElement('div');
6987
6992
  $Viewlet.className = 'Viewlet FindWidget';
6988
6993
  $Viewlet.role = Group;
@@ -6990,7 +6995,7 @@ const create$d = () => {
6990
6995
  $Viewlet
6991
6996
  };
6992
6997
  };
6993
- const focus$a = (state, key, source) => {
6998
+ const focus$9 = (state, key, source) => {
6994
6999
  if (!key) {
6995
7000
  return;
6996
7001
  }
@@ -7036,7 +7041,7 @@ const setBounds$2 = (state, x, y, width, height) => {
7036
7041
  } = state;
7037
7042
  setBounds$a($Viewlet, x, y, width, height);
7038
7043
  };
7039
- const dispose$9 = state => {
7044
+ const dispose$8 = state => {
7040
7045
  remove$1(state.$Viewlet);
7041
7046
  };
7042
7047
  const Events$3 = ViewletFindWidgetEvents;
@@ -7045,9 +7050,9 @@ const ViewletFindWidget = {
7045
7050
  __proto__: null,
7046
7051
  Events: Events$3,
7047
7052
  appendWidget: appendWidget$1,
7048
- create: create$d,
7049
- dispose: dispose$9,
7050
- focus: focus$a,
7053
+ create: create$b,
7054
+ dispose: dispose$8,
7055
+ focus: focus$9,
7051
7056
  setBounds: setBounds$2,
7052
7057
  setDom: setDom$3,
7053
7058
  setValue: setValue$1
@@ -7094,7 +7099,7 @@ const handleError$3 = (state, message) => {
7094
7099
  } = state;
7095
7100
  $Message.textContent = message;
7096
7101
  };
7097
- const focus$9 = state => {
7102
+ const focus$8 = state => {
7098
7103
  const {
7099
7104
  $Locations
7100
7105
  } = state;
@@ -7106,7 +7111,7 @@ const focus$9 = state => {
7106
7111
  const ViewletImplementations = {
7107
7112
  __proto__: null,
7108
7113
  Events: ViewletLocationsEvents,
7109
- focus: focus$9,
7114
+ focus: focus$8,
7110
7115
  handleError: handleError$3,
7111
7116
  setFocusedIndex: setFocusedIndex$1
7112
7117
  };
@@ -7254,7 +7259,7 @@ const isMatchingKeyBinding = (identifiers, identifier) => {
7254
7259
  const handleMatchingKeyBinding = identifier => {
7255
7260
  send(/* KeyBindings.handleKeyBinding */'KeyBindings.handleKeyBinding', /* keyBinding */identifier);
7256
7261
  };
7257
- const handleKeyDown$2 = event => {
7262
+ const handleKeyDown$1 = event => {
7258
7263
  const identifier = getKeyBindingIdentifier(event);
7259
7264
  const identifiers = getIdentifiers();
7260
7265
  const matchingKeyBinding = isMatchingKeyBinding(identifiers, identifier);
@@ -7286,7 +7291,7 @@ const handleResize$1 = (width, height) => {
7286
7291
  const handleFocus$3 = () => {
7287
7292
  send('Layout.handleFocus');
7288
7293
  };
7289
- const handleBlur$4 = () => {
7294
+ const handleBlur$3 = () => {
7290
7295
  send('Layout.handleBlur');
7291
7296
  };
7292
7297
 
@@ -7332,13 +7337,13 @@ const handleResize = () => {
7332
7337
  const handleFocus$2 = () => {
7333
7338
  handleFocus$3();
7334
7339
  };
7335
- const handleBlur$3 = () => {
7336
- handleBlur$4();
7340
+ const handleBlur$2 = () => {
7341
+ handleBlur$3();
7337
7342
  };
7338
- const handleKeyDown$1 = handleKeyDown$2;
7343
+ const handleKeyDown = handleKeyDown$1;
7339
7344
  const handleKeyUp = handleKeyUp$1;
7340
7345
 
7341
- const create$c = () => {
7346
+ const create$a = () => {
7342
7347
  // TODO use aria role splitter once supported https://github.com/w3c/aria/issues/1348
7343
7348
  const $SashSidebar = document.createElement('div');
7344
7349
  $SashSidebar.className = 'Viewlet Sash SashVertical';
@@ -7373,9 +7378,9 @@ const attachEvents$3 = state => {
7373
7378
  [PointerDown]: handleSashPointerDown
7374
7379
  });
7375
7380
  attachEvents$7(window, {
7376
- [Blur]: handleBlur$3,
7381
+ [Blur]: handleBlur$2,
7377
7382
  [Focus]: handleFocus$2,
7378
- [KeyDown]: handleKeyDown$1,
7383
+ [KeyDown]: handleKeyDown,
7379
7384
  [KeyUp]: handleKeyUp,
7380
7385
  [Resize]: handleResize
7381
7386
  });
@@ -7394,7 +7399,7 @@ const setSashes = (state, sashSidebar, sashPanel) => {
7394
7399
  const ViewletLayout = {
7395
7400
  __proto__: null,
7396
7401
  attachEvents: attachEvents$3,
7397
- create: create$c,
7402
+ create: create$a,
7398
7403
  setSashes
7399
7404
  };
7400
7405
 
@@ -7432,7 +7437,6 @@ const SimpleBrowser = 'SimpleBrowser';
7432
7437
  const SourceControl = 'Source Control';
7433
7438
  const StatusBar$1 = 'StatusBar';
7434
7439
  const Storage = 'Storage';
7435
- const Terminal = 'Terminal';
7436
7440
  const Terminal2 = 'Terminal2';
7437
7441
  const Terminals = 'Terminals';
7438
7442
  const TitleBar = 'TitleBar';
@@ -7450,7 +7454,7 @@ const EditorTextError = 'EditorTextError';
7450
7454
  const EditorRename = 'EditorRename';
7451
7455
  const EditorCodeGenerator = 'EditorCodeGenerator';
7452
7456
 
7453
- const create$b = () => {
7457
+ const create$9 = () => {
7454
7458
  const $ViewletOutputContent = document.createElement('div');
7455
7459
  $ViewletOutputContent.className = 'OutputContent';
7456
7460
  $ViewletOutputContent.role = Log;
@@ -7482,9 +7486,9 @@ const handleError$2 = (state, error) => {
7482
7486
  string(error);
7483
7487
  state.content.textContent = error;
7484
7488
  };
7485
- const focus$8 = state => {
7489
+ const focus$7 = state => {
7486
7490
  object(state);
7487
- focus$e(state.$ViewletOutputContent);
7491
+ focus$d(state.$ViewletOutputContent);
7488
7492
  send('Focus.setFocus', FocusOutput);
7489
7493
  };
7490
7494
 
@@ -7497,15 +7501,15 @@ const disposeFindWidget = state => {
7497
7501
  return;
7498
7502
  }
7499
7503
  };
7500
- const dispose$8 = state => {};
7504
+ const dispose$7 = state => {};
7501
7505
 
7502
7506
  const ViewletOutput = {
7503
7507
  __proto__: null,
7504
7508
  clear: clear$1,
7505
- create: create$b,
7506
- dispose: dispose$8,
7509
+ create: create$9,
7510
+ dispose: dispose$7,
7507
7511
  disposeFindWidget,
7508
- focus: focus$8,
7512
+ focus: focus$7,
7509
7513
  handleError: handleError$2,
7510
7514
  openFindWidget,
7511
7515
  setText
@@ -7557,7 +7561,7 @@ const UiStrings = {
7557
7561
  Close: 'Close',
7558
7562
  Maximize: 'Maximize'
7559
7563
  };
7560
- const create$a = () => {
7564
+ const create$8 = () => {
7561
7565
  const $PanelTabs = document.createElement('div');
7562
7566
  $PanelTabs.className = 'PanelTabs';
7563
7567
  $PanelTabs.role = TabList;
@@ -7619,14 +7623,14 @@ const setTabsDom$1 = (state, dom) => {
7619
7623
  };
7620
7624
 
7621
7625
  // TODO add test for focus method
7622
- const focus$7 = state => {
7626
+ const focus$6 = state => {
7623
7627
  object(state);
7624
7628
  if (!state.currentViewlet) {
7625
7629
  return;
7626
7630
  }
7627
7631
  state.currentViewlet.factory.focus(state.currentViewlet.state);
7628
7632
  };
7629
- const dispose$7 = state => {
7633
+ const dispose$6 = state => {
7630
7634
  if (state.$PanelContent) {
7631
7635
  state.$PanelContent.remove();
7632
7636
  state.$PanelContent = undefined;
@@ -7658,7 +7662,7 @@ const setActionsDom$1 = (state, actions, childUid) => {
7658
7662
  const {
7659
7663
  $PanelActions
7660
7664
  } = state;
7661
- const instance = get$a(childUid);
7665
+ const instance = get$8(childUid);
7662
7666
  if (!instance) {
7663
7667
  throw new Error(`child instance not found`);
7664
7668
  }
@@ -7671,9 +7675,9 @@ const setActionsDom$1 = (state, actions, childUid) => {
7671
7675
  const ViewletPanel = {
7672
7676
  __proto__: null,
7673
7677
  attachEvents: attachEvents$2,
7674
- create: create$a,
7675
- dispose: dispose$7,
7676
- focus: focus$7,
7678
+ create: create$8,
7679
+ dispose: dispose$6,
7680
+ focus: focus$6,
7677
7681
  setActionsDom: setActionsDom$1,
7678
7682
  setSelectedIndex,
7679
7683
  setTabsDom: setTabsDom$1
@@ -7682,7 +7686,7 @@ const ViewletPanel = {
7682
7686
  const ViewletReferences = {
7683
7687
  __proto__: null,
7684
7688
  Events: ViewletLocationsEvents,
7685
- focus: focus$9,
7689
+ focus: focus$8,
7686
7690
  handleError: handleError$3,
7687
7691
  setFocusedIndex: setFocusedIndex$1
7688
7692
  };
@@ -7699,7 +7703,7 @@ const handleLoadedMetadata = event => {
7699
7703
  target.play();
7700
7704
  };
7701
7705
 
7702
- const create$9 = () => {
7706
+ const create$7 = () => {
7703
7707
  const $Viewlet = document.createElement('div');
7704
7708
  $Viewlet.className = 'Viewlet ScreenCapture';
7705
7709
  return {
@@ -7719,7 +7723,7 @@ const setScreenCapture = (state, id) => {
7719
7723
 
7720
7724
  const ViewletScreenCapture = {
7721
7725
  __proto__: null,
7722
- create: create$9,
7726
+ create: create$7,
7723
7727
  setScreenCapture
7724
7728
  };
7725
7729
 
@@ -7743,7 +7747,7 @@ const handleHeaderClick = event => {
7743
7747
  }
7744
7748
  };
7745
7749
 
7746
- const create$8 = () => {
7750
+ const create$6 = () => {
7747
7751
  const $SidebarTitleAreaTitle = document.createElement('h2');
7748
7752
  $SidebarTitleAreaTitle.className = 'SideBarTitleAreaTitle';
7749
7753
  const $SidebarTitleArea = document.createElement('div');
@@ -7772,7 +7776,7 @@ const attachEvents$1 = state => {
7772
7776
  [Click]: handleHeaderClick
7773
7777
  });
7774
7778
  };
7775
- const dispose$6 = state => {
7779
+ const dispose$5 = state => {
7776
7780
  object(state);
7777
7781
  state.$Sidebar.replaceChildren();
7778
7782
  };
@@ -7800,16 +7804,16 @@ const setActionsDom = (state, actions, parentId, eventMap = {}) => {
7800
7804
  }
7801
7805
  state.$Actions = $NewViewlet;
7802
7806
  };
7803
- const focus$6 = async () => {
7807
+ const focus$5 = async () => {
7804
7808
  // await
7805
7809
  };
7806
7810
 
7807
7811
  const ViewletSidebar = {
7808
7812
  __proto__: null,
7809
7813
  attachEvents: attachEvents$1,
7810
- create: create$8,
7811
- dispose: dispose$6,
7812
- focus: focus$6,
7814
+ create: create$6,
7815
+ dispose: dispose$5,
7816
+ focus: focus$5,
7813
7817
  setActionsDom,
7814
7818
  setTitle
7815
7819
  };
@@ -7851,7 +7855,7 @@ const handleFocus$1 = event => {
7851
7855
  target.select();
7852
7856
  });
7853
7857
  };
7854
- const handleBlur$2 = event => {
7858
+ const handleBlur$1 = event => {
7855
7859
  const {
7856
7860
  target
7857
7861
  } = event;
@@ -7881,7 +7885,7 @@ const handleClickOpenExternal = () => {
7881
7885
 
7882
7886
  const ViewletSimpleBrowserEvents = {
7883
7887
  __proto__: null,
7884
- handleBlur: handleBlur$2,
7888
+ handleBlur: handleBlur$1,
7885
7889
  handleClickBackward,
7886
7890
  handleClickForward,
7887
7891
  handleClickOpenExternal,
@@ -7990,7 +7994,7 @@ const ViewletSourceControlEvents = {
7990
7994
  handleWheel: handleWheel$2
7991
7995
  };
7992
7996
 
7993
- const focus$5 = state => {
7997
+ const focus$4 = state => {
7994
7998
  const {
7995
7999
  $Viewlet
7996
8000
  } = state;
@@ -8000,7 +8004,7 @@ const focus$5 = state => {
8000
8004
  const ViewletSourceControl = {
8001
8005
  __proto__: null,
8002
8006
  Events: ViewletSourceControlEvents,
8003
- focus: focus$5
8007
+ focus: focus$4
8004
8008
  };
8005
8009
 
8006
8010
  const handleClick$2 = event => {
@@ -8017,7 +8021,7 @@ const ViewletStatusBarEvents = {
8017
8021
  handleClick: handleClick$2
8018
8022
  };
8019
8023
 
8020
- const create$7 = () => {
8024
+ const create$5 = () => {
8021
8025
  const $Viewlet = document.createElement('div');
8022
8026
  $Viewlet.id = 'StatusBar';
8023
8027
  $Viewlet.className = 'Viewlet StatusBar';
@@ -8036,7 +8040,7 @@ const setDom$2 = (state, dom) => {
8036
8040
  } = state;
8037
8041
  renderInto($Viewlet, dom, ViewletStatusBarEvents);
8038
8042
  };
8039
- const focus$4 = state => {
8043
+ const focus$3 = state => {
8040
8044
  object(state);
8041
8045
  const {
8042
8046
  $Viewlet
@@ -8046,8 +8050,8 @@ const focus$4 = state => {
8046
8050
 
8047
8051
  const ViewletStatusBar = {
8048
8052
  __proto__: null,
8049
- create: create$7,
8050
- focus: focus$4,
8053
+ create: create$5,
8054
+ focus: focus$3,
8051
8055
  setDom: setDom$2
8052
8056
  };
8053
8057
 
@@ -8077,7 +8081,7 @@ const handleClickTab = event => {
8077
8081
  handleClickTab$2(uid, index);
8078
8082
  };
8079
8083
 
8080
- const create$6 = () => {
8084
+ const create$4 = () => {
8081
8085
  const $Viewlet = document.createElement('div');
8082
8086
  $Viewlet.className = 'Viewlet Terminals';
8083
8087
  return {
@@ -8104,7 +8108,7 @@ const setTabsDom = (state, dom) => {
8104
8108
 
8105
8109
  const ViewletTerminals = {
8106
8110
  __proto__: null,
8107
- create: create$6,
8111
+ create: create$4,
8108
8112
  setTabsDom
8109
8113
  };
8110
8114
 
@@ -8205,8 +8209,8 @@ const ViewletTitleBarMenuBarEvents = {
8205
8209
  };
8206
8210
 
8207
8211
  const activeId = 'TitleBarEntryActive';
8208
- const dispose$5 = state => {};
8209
- const focus$3 = state => {
8212
+ const dispose$4 = state => {};
8213
+ const focus$2 = state => {
8210
8214
  const {
8211
8215
  $TitleBarMenuBar
8212
8216
  } = state;
@@ -8442,8 +8446,8 @@ const ViewletTitleBarMenuBar = {
8442
8446
  __proto__: null,
8443
8447
  Events: ViewletTitleBarMenuBarEvents,
8444
8448
  closeMenu,
8445
- dispose: dispose$5,
8446
- focus: focus$3,
8449
+ dispose: dispose$4,
8450
+ focus: focus$2,
8447
8451
  openMenu,
8448
8452
  setFocusedIndex,
8449
8453
  setMenus
@@ -8461,8 +8465,8 @@ const ViewletTitleBar = {
8461
8465
  __proto__: null,
8462
8466
  Events: ViewletTitleBarMenuBarEvents,
8463
8467
  closeMenu,
8464
- dispose: dispose$5,
8465
- focus: focus$3,
8468
+ dispose: dispose$4,
8469
+ focus: focus$2,
8466
8470
  openMenu,
8467
8471
  setFocused,
8468
8472
  setFocusedIndex,
@@ -8499,7 +8503,7 @@ const ViewletTitleBarIcon = {
8499
8503
  Events
8500
8504
  };
8501
8505
 
8502
- const create$5 = () => {
8506
+ const create$3 = () => {
8503
8507
  const $Viewlet = document.createElement('div');
8504
8508
  $Viewlet.className = 'Viewlet TitleBarTitle';
8505
8509
  return {
@@ -8515,7 +8519,7 @@ const setDom$1 = (state, dom) => {
8515
8519
 
8516
8520
  const ViewletTitleBarTitle = {
8517
8521
  __proto__: null,
8518
- create: create$5,
8522
+ create: create$3,
8519
8523
  setDom: setDom$1
8520
8524
  };
8521
8525
 
@@ -8677,7 +8681,6 @@ const moduleLoaders = {
8677
8681
  [SourceControl]: () => ViewletSourceControl,
8678
8682
  [StatusBar$1]: () => ViewletStatusBar,
8679
8683
  [Storage]: () => ViewletStorage,
8680
- [Terminal]: () => Promise.resolve().then(function () { return ViewletTerminal; }),
8681
8684
  [Terminal2]: () => Promise.resolve().then(function () { return ViewletTerminal2; }),
8682
8685
  [Terminals]: () => ViewletTerminals,
8683
8686
  [TitleBar]: () => ViewletTitleBar,
@@ -8702,12 +8705,12 @@ const state$1 = {
8702
8705
  modules: Object.create(null)
8703
8706
  };
8704
8707
 
8705
- const create$4 = (id, uid = id) => {
8708
+ const create$2 = (id, uid = id) => {
8706
8709
  const module = state$1.modules[id];
8707
8710
  if (!module) {
8708
8711
  throw new Error(`module not found: ${id}`);
8709
8712
  }
8710
- const existing = get$a(id);
8713
+ const existing = get$8(id);
8711
8714
  if (existing?.state.$Viewlet.isConnected) {
8712
8715
  existing.state.$Viewlet.remove();
8713
8716
  }
@@ -8729,7 +8732,7 @@ const createFunctionalRoot = (id, uid = id, hasFunctionalEvents) => {
8729
8732
  if (!module) {
8730
8733
  throw new Error(`module not found: ${id}`);
8731
8734
  }
8732
- const existing = get$a(id);
8735
+ const existing = get$8(id);
8733
8736
  if (existing?.state.$Viewlet.isConnected) {
8734
8737
  existing.state.$Viewlet.remove();
8735
8738
  }
@@ -8759,7 +8762,7 @@ const loadModule = async id => {
8759
8762
  };
8760
8763
  const invoke = (viewletId, method, ...args) => {
8761
8764
  string(method);
8762
- const instance = get$a(viewletId);
8765
+ const instance = get$8(viewletId);
8763
8766
  if (!instance?.factory) {
8764
8767
  if (viewletId && method !== 'setActionsDom') {
8765
8768
  warn$1(`cannot execute ${method} viewlet instance ${viewletId} not found`);
@@ -8772,12 +8775,12 @@ const invoke = (viewletId, method, ...args) => {
8772
8775
  }
8773
8776
  return instance.factory[method](instance.state, ...args);
8774
8777
  };
8775
- const focus$2 = viewletId => {
8778
+ const focus$1 = viewletId => {
8776
8779
  if (location.search.includes('traceFocus')) {
8777
8780
  // eslint-disable-next-line no-console
8778
8781
  console.trace(`focus ${viewletId}`);
8779
8782
  }
8780
- const instance = get$a(viewletId);
8783
+ const instance = get$8(viewletId);
8781
8784
  if (instance.factory?.setFocused) {
8782
8785
  instance.factory.setFocused(instance.state, true);
8783
8786
  } else if (instance?.factory?.focus) {
@@ -8793,7 +8796,7 @@ const focusElementByName = (viewletId, name) => {
8793
8796
  // eslint-disable-next-line no-console
8794
8797
  console.trace(`focusByName ${viewletId} ${name}`);
8795
8798
  }
8796
- const instance = get$a(viewletId);
8799
+ const instance = get$8(viewletId);
8797
8800
  if (!instance) {
8798
8801
  return;
8799
8802
  }
@@ -8808,7 +8811,7 @@ const focusElementByName = (viewletId, name) => {
8808
8811
  };
8809
8812
  const setElementProperty = (viewletId, name, key, value) => {
8810
8813
  const selector = `[name="${name}"]`;
8811
- const instance = get$a(viewletId);
8814
+ const instance = get$8(viewletId);
8812
8815
  if (!instance) {
8813
8816
  return;
8814
8817
  }
@@ -8837,7 +8840,7 @@ const setCheckboxValue = (viewletId, name, value) => {
8837
8840
  };
8838
8841
  const setSelectionByName = (viewletId, name, start, end) => {
8839
8842
  const selector = `[name="${name}"]`;
8840
- const instance = get$a(viewletId);
8843
+ const instance = get$8(viewletId);
8841
8844
  if (!instance) {
8842
8845
  return;
8843
8846
  }
@@ -8852,7 +8855,7 @@ const setSelectionByName = (viewletId, name, start, end) => {
8852
8855
  $Element.selectionEnd = end;
8853
8856
  };
8854
8857
  const setUid = (viewletId, uid) => {
8855
- const instance = get$a(viewletId);
8858
+ const instance = get$8(viewletId);
8856
8859
  if (!instance) {
8857
8860
  return;
8858
8861
  }
@@ -8870,7 +8873,7 @@ const resetFocusCallback = () => {
8870
8873
  focusCallback.selector = '';
8871
8874
  };
8872
8875
  const focusSelector = (viewletId, selector) => {
8873
- const instance = get$a(viewletId);
8876
+ const instance = get$8(viewletId);
8874
8877
  if (!instance) {
8875
8878
  return;
8876
8879
  }
@@ -8894,8 +8897,8 @@ const focusSelector = (viewletId, selector) => {
8894
8897
  /**
8895
8898
  * @deprecated
8896
8899
  */
8897
- const refresh$1 = (viewletId, viewletContext) => {
8898
- const instance = get$a(viewletId);
8900
+ const refresh = (viewletId, viewletContext) => {
8901
+ const instance = get$8(viewletId);
8899
8902
  if (instance) {
8900
8903
  instance.factory.refresh(instance.state, viewletContext);
8901
8904
  } else {
@@ -8914,7 +8917,7 @@ const createPlaceholder = (viewletId, parentId, top, left, width, height) => {
8914
8917
  if (isSpecial(viewletId)) {
8915
8918
  $Placeholder.id = viewletId;
8916
8919
  }
8917
- const parentInstance = get$a(parentId);
8920
+ const parentInstance = get$8(parentId);
8918
8921
  const $Parent = parentInstance.state.$Viewlet;
8919
8922
  $Parent.append($Placeholder);
8920
8923
  set$a(viewletId, {
@@ -8927,7 +8930,7 @@ const setDragData = (viewletId, dragData) => {
8927
8930
  set$2(viewletId, dragData);
8928
8931
  };
8929
8932
  const setDom = (viewletId, dom) => {
8930
- const instance = get$a(viewletId);
8933
+ const instance = get$8(viewletId);
8931
8934
  if (!instance) {
8932
8935
  return;
8933
8936
  }
@@ -8940,7 +8943,7 @@ const setDom = (viewletId, dom) => {
8940
8943
  renderInto($Viewlet, dom, Events);
8941
8944
  };
8942
8945
  const setDom2 = (viewletId, dom) => {
8943
- const instance = get$a(viewletId);
8946
+ const instance = get$8(viewletId);
8944
8947
  if (!instance) {
8945
8948
  return;
8946
8949
  }
@@ -8971,7 +8974,7 @@ const setDom2 = (viewletId, dom) => {
8971
8974
  });
8972
8975
  };
8973
8976
  const setPatches = (uid, patches) => {
8974
- const instance = get$a(uid);
8977
+ const instance = get$8(uid);
8975
8978
  if (!instance) {
8976
8979
  return;
8977
8980
  }
@@ -9021,9 +9024,9 @@ const move = async (uid, selector, target) => {
9021
9024
  };
9022
9025
  const attachWindowEvents = () => {
9023
9026
  attachEvents$7(window, {
9024
- [Blur]: handleBlur$3,
9027
+ [Blur]: handleBlur$2,
9025
9028
  [Focus]: handleFocus$2,
9026
- [KeyDown]: handleKeyDown$1,
9029
+ [KeyDown]: handleKeyDown,
9027
9030
  [KeyUp]: handleKeyUp,
9028
9031
  [Resize]: handleResize
9029
9032
  });
@@ -9033,10 +9036,10 @@ const attachWindowEvents = () => {
9033
9036
  const sendMultiple = commands => {
9034
9037
  executeCommands(commands);
9035
9038
  };
9036
- const dispose$4 = id => {
9039
+ const dispose$3 = id => {
9037
9040
  try {
9038
9041
  number(id);
9039
- const instance = get$a(id);
9042
+ const instance = get$8(id);
9040
9043
  if (!instance) {
9041
9044
  warn$1(`viewlet instance ${id} not found and cannot be disposed`);
9042
9045
  return;
@@ -9055,7 +9058,7 @@ const dispose$4 = id => {
9055
9058
  };
9056
9059
  const handleError$1 = (id, parentId, message) => {
9057
9060
  info(`[viewlet-error] ${id}: ${message}`);
9058
- const instance = get$a(id);
9061
+ const instance = get$8(id);
9059
9062
  if (instance?.state.$Viewlet.isConnected) {
9060
9063
  instance.state.$Viewlet.remove();
9061
9064
  }
@@ -9067,7 +9070,7 @@ const handleError$1 = (id, parentId, message) => {
9067
9070
  instance.state.$Viewlet.textContent = String(message);
9068
9071
  }
9069
9072
  // TODO error should bubble up to until highest possible component
9070
- const parentInstance = get$a(parentId);
9073
+ const parentInstance = get$8(parentId);
9071
9074
  if (parentInstance?.factory?.handleError) {
9072
9075
  parentInstance.factory.handleError(instance.state, message);
9073
9076
  }
@@ -9081,9 +9084,9 @@ const appendViewlet = (parentId, childId, focus) => {
9081
9084
  // TODO
9082
9085
  return;
9083
9086
  }
9084
- const parentInstanceState = get$a(parentId); // TODO must ensure that parent is already created
9087
+ const parentInstanceState = get$8(parentId); // TODO must ensure that parent is already created
9085
9088
  const parentModule = parentInstanceState.factory;
9086
- const childInstance = get$a(childId);
9089
+ const childInstance = get$8(childId);
9087
9090
  if (!childInstance) {
9088
9091
  throw new Error(`child instance ${childId} must be defined to be appended to parent ${parentId}`);
9089
9092
  }
@@ -9107,7 +9110,7 @@ const prependChild = ($Parent, $Child) => {
9107
9110
  const appendAfterPreviousReference = (referenceNodes, childIndex, $Child) => {
9108
9111
  for (let i = childIndex - 1; i >= 0; i--) {
9109
9112
  const beforeId = referenceNodes[i];
9110
- const beforeInstance = get$a(beforeId);
9113
+ const beforeInstance = get$8(beforeId);
9111
9114
  if (beforeInstance) {
9112
9115
  const $ReferenceNode = beforeInstance.state.$Viewlet;
9113
9116
  $ReferenceNode.after($Child);
@@ -9119,7 +9122,7 @@ const appendAfterPreviousReference = (referenceNodes, childIndex, $Child) => {
9119
9122
  const appendBeforeNextReference = (referenceNodes, childIndex, $Child) => {
9120
9123
  for (let i = childIndex + 1; i < referenceNodes.length; i++) {
9121
9124
  const afterId = referenceNodes[i];
9122
- const afterInstance = get$a(afterId);
9125
+ const afterInstance = get$8(afterId);
9123
9126
  if (afterInstance) {
9124
9127
  const $ReferenceNode = afterInstance.state.$Viewlet;
9125
9128
  $ReferenceNode.before($Child);
@@ -9149,12 +9152,12 @@ const appendWithReferenceNodes = ($Parent, $Child, childId, referenceNodes) => {
9149
9152
  const append = (parentId, childId, referenceNodes) => {
9150
9153
  number(parentId);
9151
9154
  number(childId);
9152
- const parentInstance = get$a(parentId);
9155
+ const parentInstance = get$8(parentId);
9153
9156
  if (!parentInstance) {
9154
9157
  throw new Error(`cannot append child: instance ${parentId} not found`);
9155
9158
  }
9156
9159
  const $Parent = parentInstance.state.$Viewlet;
9157
- const childInstance = get$a(childId);
9160
+ const childInstance = get$8(childId);
9158
9161
  if (!childInstance) {
9159
9162
  throw new Error(`cannot append child: child instance not found ${childId}`);
9160
9163
  }
@@ -9173,11 +9176,11 @@ const append = (parentId, childId, referenceNodes) => {
9173
9176
  applyLateFocusMaybe();
9174
9177
  };
9175
9178
  const replaceChildren = (parentId, childIds) => {
9176
- const parentInstance = get$a(parentId);
9179
+ const parentInstance = get$8(parentId);
9177
9180
  const $Parent = parentInstance.state.$Viewlet;
9178
9181
  const $Fragment = document.createDocumentFragment();
9179
9182
  for (const childId of childIds) {
9180
- const childInstance = get$a(childId);
9183
+ const childInstance = get$8(childId);
9181
9184
  const $Child = childInstance.state.$Viewlet;
9182
9185
  $Fragment.append($Child);
9183
9186
  }
@@ -9192,7 +9195,7 @@ const applyLateFocusMaybe = () => {
9192
9195
  selector
9193
9196
  } = focusCallback;
9194
9197
  resetFocusCallback();
9195
- const instance = get$a(id);
9198
+ const instance = get$8(id);
9196
9199
  if (instance) {
9197
9200
  const {
9198
9201
  $Viewlet
@@ -9205,7 +9208,7 @@ const applyLateFocusMaybe = () => {
9205
9208
  };
9206
9209
  const appendToBody = childId => {
9207
9210
  const $Parent = document.body;
9208
- const childInstance = get$a(childId);
9211
+ const childInstance = get$8(childId);
9209
9212
  const $Child = childInstance.state.$Viewlet;
9210
9213
  $Parent.append($Child);
9211
9214
  applyLateFocusMaybe();
@@ -9218,7 +9221,7 @@ const executeCommands = commands => {
9218
9221
  }
9219
9222
  };
9220
9223
  const show = id => {
9221
- const instance = get$a(id);
9224
+ const instance = get$8(id);
9222
9225
  const $Viewlet = instance.state.$Viewlet;
9223
9226
  const $Workbench = document.getElementById('Workbench');
9224
9227
  // @ts-expect-error
@@ -9228,7 +9231,7 @@ const show = id => {
9228
9231
  }
9229
9232
  };
9230
9233
  const setBounds$1 = (id, left, top, width, height) => {
9231
- const instance = get$a(id);
9234
+ const instance = get$8(id);
9232
9235
  if (!instance) {
9233
9236
  return;
9234
9237
  }
@@ -9236,7 +9239,7 @@ const setBounds$1 = (id, left, top, width, height) => {
9236
9239
  setBounds$a($Viewlet, left, top, width, height);
9237
9240
  };
9238
9241
  const setProperty = (id, selector, property, value) => {
9239
- const instance = get$a(id);
9242
+ const instance = get$8(id);
9240
9243
  if (!instance) {
9241
9244
  return;
9242
9245
  }
@@ -9256,11 +9259,11 @@ const commandHandlers = {
9256
9259
  'Viewlet.appendViewlet': appendViewlet,
9257
9260
  'Viewlet.ariaAnnounce': ariaAnnounce,
9258
9261
  'Viewlet.attachWindowEvents': attachWindowEvents,
9259
- 'Viewlet.create': create$4,
9262
+ 'Viewlet.create': create$2,
9260
9263
  'Viewlet.createFunctionalRoot': createFunctionalRoot,
9261
9264
  'Viewlet.createPlaceholder': createPlaceholder,
9262
- 'Viewlet.dispose': dispose$4,
9263
- 'Viewlet.focus': focus$2,
9265
+ 'Viewlet.dispose': dispose$3,
9266
+ 'Viewlet.focus': focus$1,
9264
9267
  'Viewlet.focusElementByName': focusElementByName,
9265
9268
  'Viewlet.focusSelector': focusSelector,
9266
9269
  'Viewlet.handleError': handleError$1,
@@ -9393,7 +9396,7 @@ const getFilePathElectron = async file => {
9393
9396
  };
9394
9397
 
9395
9398
  const handleMessagePort = async port => {
9396
- await create$z({
9399
+ await create$x({
9397
9400
  commandMap: {},
9398
9401
  messagePort: port
9399
9402
  });
@@ -9418,7 +9421,7 @@ const waitForFrameToLoad = $Frame => {
9418
9421
  };
9419
9422
 
9420
9423
  // TODO could use browser view when running in electron
9421
- const create$3 = async (uid, src, sandbox, csp, credentialless, permissionPolicy, title) => {
9424
+ const create$1 = async (uid, src, sandbox, csp, credentialless, permissionPolicy, title) => {
9422
9425
  const $Iframe = document.createElement('iframe');
9423
9426
  setIframeCredentialless($Iframe, credentialless);
9424
9427
  setIframeCsp($Iframe, csp);
@@ -9471,7 +9474,7 @@ const setPort = (uid, port, origin, portType) => {
9471
9474
  params: [port, portType]
9472
9475
  }, origin, [port]);
9473
9476
  };
9474
- const dispose$3 = uid => {
9477
+ const dispose$2 = uid => {
9475
9478
  const $Iframe = get$1(uid);
9476
9479
  $Iframe.remove();
9477
9480
  remove(uid);
@@ -9482,7 +9485,7 @@ const commandMap = {
9482
9485
  'ClipBoard.execCopy': execCopy,
9483
9486
  'ClipBoard.read': read,
9484
9487
  'ClipBoard.readText': readText,
9485
- 'ClipBoard.write': write$2,
9488
+ 'ClipBoard.write': write$1,
9486
9489
  'ClipBoard.writeImage': writeImage,
9487
9490
  'ClipBoard.writeText': writeText,
9488
9491
  'ConfirmPrompt.prompt': confirm,
@@ -9490,7 +9493,7 @@ const commandMap = {
9490
9493
  'Css.getSelectionText': getSelectionText,
9491
9494
  'Developer.showState': showState,
9492
9495
  'Download.downloadFile': downloadFile,
9493
- 'FileHandles.get': get$8,
9496
+ 'FileHandles.get': get$6,
9494
9497
  'FilePicker.showDirectoryPicker': showDirectoryPicker,
9495
9498
  'FilePicker.showFilePicker': showFilePicker,
9496
9499
  'FilePicker.showSaveFilePicker': showSaveFilePicker,
@@ -9500,8 +9503,8 @@ const commandMap = {
9500
9503
  'GetFilePathElectron.getFilePathElectron': getFilePathElectron,
9501
9504
  'HandleMessagePort.handleMessagePort': handleMessagePort,
9502
9505
  'InitData.getInitData': getInitData,
9503
- 'IpcParent.create': create$w,
9504
- 'IpcParent.dispose': dispose$j,
9506
+ 'IpcParent.create': create$u,
9507
+ 'IpcParent.dispose': dispose$i,
9505
9508
  'KeyBindings.setIdentifiers': setIdentifiers,
9506
9509
  'Layout.getBounds': getBounds,
9507
9510
  'Location.getHref': getHref,
@@ -9516,10 +9519,10 @@ const commandMap = {
9516
9519
  'Menu.showControlled': showControlled,
9517
9520
  'Menu.showMenu': showMenu,
9518
9521
  'Meta.setThemeColor': setThemeColor,
9519
- 'Notification.create': create$v,
9522
+ 'Notification.create': create$t,
9520
9523
  'Notification.createWithOptions': createWithOptions,
9521
- 'Notification.dispose': dispose$i,
9522
- 'OffscreenCanvas.create': create$u,
9524
+ 'Notification.dispose': dispose$h,
9525
+ 'OffscreenCanvas.create': create$s,
9523
9526
  'OffscreenCanvas.create2': create2,
9524
9527
  'Open.openUrl': openUrl,
9525
9528
  'Open.redirectToUrl': redirectToUrl,
@@ -9541,15 +9544,15 @@ const commandMap = {
9541
9544
  'TestFrameWork.transferToWebView': transferToWebView,
9542
9545
  'Viewlet.addKeyBindings': addKeyBindings,
9543
9546
  'Viewlet.appendViewlet': appendViewlet,
9544
- 'Viewlet.dispose': dispose$4,
9547
+ 'Viewlet.dispose': dispose$3,
9545
9548
  'Viewlet.executeCommands': executeCommands,
9546
- 'Viewlet.focus': focus$2,
9549
+ 'Viewlet.focus': focus$1,
9547
9550
  'Viewlet.focusElementByName': focusElementByName,
9548
9551
  'Viewlet.focusSelector': focusSelector,
9549
9552
  'Viewlet.handleError': handleError$1,
9550
9553
  'Viewlet.invoke': invoke,
9551
9554
  'Viewlet.loadModule': loadModule,
9552
- 'Viewlet.refresh': refresh$1,
9555
+ 'Viewlet.refresh': refresh,
9553
9556
  'Viewlet.registerEventListeners': registerEventListeners,
9554
9557
  'Viewlet.removeKeyBindings': removeKeyBindings,
9555
9558
  'Viewlet.send': invoke,
@@ -9561,8 +9564,8 @@ const commandMap = {
9561
9564
  'WebStorage.setItem': setItem,
9562
9565
  'WebStorage.setJsonObjects': setJsonObjects,
9563
9566
  'WebView.appendOnly': appendOnly,
9564
- 'WebView.create': create$3,
9565
- 'WebView.dispose': dispose$3,
9567
+ 'WebView.create': create$1,
9568
+ 'WebView.dispose': dispose$2,
9566
9569
  'WebView.load': load,
9567
9570
  'WebView.loadOnly': loadOnly,
9568
9571
  'WebView.setPort': setPort,
@@ -9856,7 +9859,7 @@ const editorWorkerUrl = getConfiguredEditorWorkerUrl() || `${assetDir}/packages/
9856
9859
 
9857
9860
  const launchEditorWorker = async port => {
9858
9861
  try {
9859
- await create$w({
9862
+ await create$u({
9860
9863
  method: ModuleWorkerWithMessagePort,
9861
9864
  name: 'Editor Worker',
9862
9865
  port,
@@ -9893,7 +9896,7 @@ const extensionHostWorkerUrl = getConfiguredExtensionHostWorkerUrl() || `${asset
9893
9896
  const launchExtensionHostWorker = async port => {
9894
9897
  const name = isElectron ? 'Extension Host (Electron)' : 'Extension Host';
9895
9898
  try {
9896
- await create$w({
9899
+ await create$u({
9897
9900
  method: ModuleWorkerWithMessagePort,
9898
9901
  name,
9899
9902
  port,
@@ -9930,7 +9933,7 @@ const syntaxHighlightingWorkerUrl = getConfiguredSyntaxHighlightingWorkerUrl() |
9930
9933
 
9931
9934
  const launchSyntaxHighlightingWorker = async port => {
9932
9935
  try {
9933
- await create$w({
9936
+ await create$u({
9934
9937
  method: ModuleWorkerWithMessagePort,
9935
9938
  name: 'Syntax Highlighting Worker',
9936
9939
  port,
@@ -9978,7 +9981,7 @@ const handleFocusIn = event => {
9978
9981
  const uid = fromEvent(event);
9979
9982
  handleFocusIn$4(uid);
9980
9983
  };
9981
- const handleBlur$1 = event => {
9984
+ const handleBlur = event => {
9982
9985
  const uid = fromEvent(event);
9983
9986
  executeViewletCommand(uid, 'EditorRename.handleBlur');
9984
9987
  };
@@ -9995,7 +9998,7 @@ const handleInput = event => {
9995
9998
 
9996
9999
  const ViewletEditorRenameEvents = {
9997
10000
  __proto__: null,
9998
- handleBlur: handleBlur$1,
10001
+ handleBlur,
9999
10002
  handleFocusIn,
10000
10003
  handleInput
10001
10004
  };
@@ -10013,7 +10016,7 @@ const appendWidget = state => {
10013
10016
  } = state;
10014
10017
  append$1($Viewlet);
10015
10018
  };
10016
- const dispose$2 = state => {
10019
+ const dispose$1 = state => {
10017
10020
  remove$1(state.$Viewlet);
10018
10021
  };
10019
10022
 
@@ -10021,7 +10024,7 @@ const ViewletEditorRename = {
10021
10024
  __proto__: null,
10022
10025
  Events: ViewletEditorRenameEvents,
10023
10026
  appendWidget,
10024
- dispose: dispose$2,
10027
+ dispose: dispose$1,
10025
10028
  setBounds
10026
10029
  };
10027
10030
 
@@ -10085,227 +10088,46 @@ const main = async () => {
10085
10088
 
10086
10089
  main();
10087
10090
 
10088
- const isUint8Array = value => {
10089
- return value instanceof Uint8Array;
10090
- };
10091
-
10092
- const CHAR_WIDTH = 12;
10093
- const CHAR_HEIGHT = 15;
10094
-
10095
- const tmpCanvas = new OffscreenCanvas(CHAR_WIDTH, CHAR_HEIGHT) ;
10096
- tmpCanvas.getContext("2d", {
10097
- // desynchronized: true, // perf
10098
- alpha: false // perf
10099
- });
10100
-
10101
- const noop = () => {};
10102
- const createOffscreenTerminalDom = (root, {
10103
- handleMouseDown = noop,
10104
- handleKeyDown = noop,
10105
- handleBlur = noop,
10106
- canvasText = document.createElement("canvas"),
10107
- canvasCursor = document.createElement("canvas")
10108
- }) => {
10109
- root.onmousedown = event => {
10110
- event.preventDefault();
10111
- textarea.focus();
10112
- handleMouseDown();
10113
- };
10114
- canvasText.className = "TerminalCanvasText";
10115
- canvasCursor.className = "TerminalCanvasCursor";
10116
- const $Layers = document.createElement("div");
10117
- $Layers.className = "TerminalLayers";
10118
- const textarea = document.createElement("textarea");
10119
- textarea.className = "TerminalTextArea";
10120
- textarea.name = "terminal-input";
10121
- $Layers.append(canvasText, canvasCursor);
10122
- root.append(textarea, $Layers);
10123
- const wrappedKeyDown = event => {
10124
- // @ts-ignore
10125
- handleKeyDown({
10126
- key: event.key,
10127
- shiftKey: event.shiftKey,
10128
- altKey: event.altKey,
10129
- ctrlKey: event.ctrlKey,
10130
- metaKey: event.metaKey
10131
- });
10132
- };
10133
- textarea.onkeydown = wrappedKeyDown;
10134
- const handleBeforeInput = event => {
10135
- event.preventDefault();
10136
- };
10137
- textarea.addEventListener("beforeinput", handleBeforeInput);
10138
- textarea.onblur = handleBlur;
10139
- const focusTextArea = () => {
10140
- textarea.focus();
10141
- };
10142
- return {
10143
- /**
10144
- * @deprecated
10145
- */
10146
- get offscreenCanvasCursor() {
10147
- return canvasCursor.transferControlToOffscreen();
10148
- },
10149
- /**
10150
- * @deprecated
10151
- */
10152
- get offscreenCanvasText() {
10153
- return canvasText.transferControlToOffscreen();
10154
- },
10155
- focusTextArea
10156
- };
10157
- };
10158
-
10159
- const create$2 = ({
10160
- $Element,
10161
- ...options
10162
- }) => {
10163
- const terminal = createOffscreenTerminalDom($Element, options);
10164
- return terminal;
10165
- };
10166
-
10167
- const handleBlur = event => {
10168
- const uid = fromEvent(event);
10169
- handleBlur$7(uid);
10170
- };
10171
- const handleMouseDown$1 = (event, ...args) => {
10172
- const uid = fromEvent(event);
10173
- handleMouseDown$2(uid, ...args);
10174
- };
10175
- const handleKeyDown = (event, ...args) => {
10176
- const uid = fromEvent(event);
10177
- handleKeyDown$4(uid, ...args);
10178
- };
10179
-
10180
- const create$1 = () => {
10181
- const $Viewlet = document.createElement('div');
10182
- $Viewlet.className = 'Viewlet Terminal';
10183
- return {
10184
- $Viewlet,
10185
- terminal: undefined
10186
- };
10187
- };
10188
- const setTerminal$1 = (state, canvasCursorId, canvasTextId) => {
10189
- const canvasText = get$4(canvasTextId);
10190
- const canvasCursor = get$4(canvasCursorId);
10191
- const {
10192
- $Viewlet
10193
- } = state;
10194
- const terminal = create$2({
10195
- $Element: $Viewlet,
10196
- background: `#1b2020`,
10197
- canvasCursor,
10198
- canvasText,
10199
- foreground: 'white',
10200
- handleBlur: (...args) => {
10201
- // @ts-ignore
10202
- handleBlur({
10203
- target: $Viewlet
10204
- }, ...args);
10205
- },
10206
- handleKeyDown: (...args) => {
10207
- handleKeyDown({
10208
- target: $Viewlet
10209
- }, ...args);
10210
- },
10211
- handleMouseDown: (...args) => {
10212
- handleMouseDown$1({
10213
- target: $Viewlet
10214
- }, ...args);
10215
- }
10216
- });
10217
- state.terminal = terminal;
10218
- };
10219
- const focusTextArea = state => {
10220
- const {
10221
- terminal
10222
- } = state;
10223
- terminal.focusTextArea();
10224
- };
10225
- const refresh = (state, context) => {
10226
- // state.element.textContent = context.text
10227
- };
10228
- const dispose$1 = state => {
10229
- // TODO unregister callback
10230
- // SharedProcess.unregisterChannel(channel )
10231
-
10232
- window.removeEventListener('resize', state.handleUpdate);
10233
- };
10234
- const focus$1 = state => {
10235
- object(state);
10236
- const {
10237
- terminal
10238
- } = state;
10239
- terminal.focus();
10240
- };
10241
- const reduceFocus = (state, action) => {};
10242
-
10243
- // TODO what is this
10244
- const reduceWrite = (state, action) => {
10245
- };
10246
- const reduce = (state, action) => {
10247
- switch (action.type) {
10248
- case 'focus':
10249
- {
10250
- return;
10251
- }
10252
- case 'write':
10253
- {
10254
- return;
10255
- }
10256
- }
10257
- };
10258
- const write$1 = (state, data) => {
10259
- if (!isUint8Array(data)) {
10260
- throw new TypeError(`data must be of type Uint8Array`);
10261
- }
10262
- };
10263
- const Commands = {
10264
- 9922: write$1
10265
- };
10266
-
10267
- const ViewletTerminal = {
10268
- __proto__: null,
10269
- Commands,
10270
- create: create$1,
10271
- dispose: dispose$1,
10272
- focus: focus$1,
10273
- focusTextArea,
10274
- reduce,
10275
- reduceFocus,
10276
- reduceWrite,
10277
- refresh,
10278
- setTerminal: setTerminal$1,
10279
- write: write$1
10280
- };
10281
-
10282
10091
  const defaultColumns = 80;
10283
10092
  const defaultRows = 24;
10284
10093
  const createTerminal = async () => {
10285
- const {
10094
+ const [{
10095
+ FitAddon
10096
+ }, {
10286
10097
  Terminal
10287
- } = await import('./xterm.js');
10288
- return new Terminal({
10098
+ }] = await Promise.all([import('./xterm.js'), import('./xterm.js')]);
10099
+ const terminal = new Terminal({
10289
10100
  cols: defaultColumns,
10290
10101
  convertEol: true,
10291
10102
  cursorBlink: true,
10292
10103
  rows: defaultRows
10293
10104
  });
10294
- };
10295
- const create = () => {
10296
- const $Viewlet = document.createElement('div');
10297
- $Viewlet.className = 'Viewlet Terminal XtermTerminal';
10105
+ const fitAddon = new FitAddon();
10106
+ terminal.loadAddon(fitAddon);
10298
10107
  return {
10299
- $Viewlet,
10300
- disposables: [],
10301
- terminal: undefined
10108
+ fitAddon,
10109
+ terminal
10302
10110
  };
10303
10111
  };
10304
- const setTerminal = async (state, uid) => {
10305
- if (state.terminal) {
10112
+ const flushPendingData = state => {
10113
+ const {
10114
+ pendingData,
10115
+ terminal
10116
+ } = state;
10117
+ for (const data of pendingData) {
10118
+ terminal.write(data);
10119
+ }
10120
+ pendingData.length = 0;
10121
+ };
10122
+ const mountTerminal = async (state, uid) => {
10123
+ const {
10124
+ fitAddon,
10125
+ terminal
10126
+ } = await createTerminal();
10127
+ if (state.disposed) {
10128
+ terminal.dispose();
10306
10129
  return;
10307
10130
  }
10308
- const terminal = await createTerminal();
10309
10131
  const inputDisposable = terminal.onData(data => {
10310
10132
  handleInput$6(uid, data);
10311
10133
  });
@@ -10319,14 +10141,49 @@ const setTerminal = async (state, uid) => {
10319
10141
  });
10320
10142
  });
10321
10143
  terminal.open(state.$Viewlet);
10144
+ const resizeObserver = new ResizeObserver(() => {
10145
+ fitAddon.fit();
10146
+ });
10147
+ resizeObserver.observe(state.$Viewlet);
10148
+ state.fitAddon = fitAddon;
10149
+ state.resizeObserver = resizeObserver;
10322
10150
  state.terminal = terminal;
10323
10151
  state.disposables = [inputDisposable, resizeDisposable];
10152
+ fitAddon.fit();
10153
+ flushPendingData(state);
10154
+ };
10155
+ const create = () => {
10156
+ const $Viewlet = document.createElement('div');
10157
+ $Viewlet.className = 'Viewlet Terminal XtermTerminal';
10158
+ return {
10159
+ $Viewlet,
10160
+ disposables: [],
10161
+ disposed: false,
10162
+ fitAddon: undefined,
10163
+ mountPromise: undefined,
10164
+ mouseDownListener: undefined,
10165
+ pendingData: [],
10166
+ resizeObserver: undefined,
10167
+ terminal: undefined
10168
+ };
10169
+ };
10170
+ const setTerminal = (state, uid) => {
10171
+ if (state.terminal) {
10172
+ return Promise.resolve();
10173
+ }
10174
+ if (!state.mountPromise) {
10175
+ state.mountPromise = mountTerminal(state, uid);
10176
+ }
10177
+ return state.mountPromise;
10324
10178
  };
10325
10179
  const write = (state, data) => {
10326
10180
  const {
10327
10181
  terminal
10328
10182
  } = state;
10329
10183
  if (!terminal) {
10184
+ if (!state.disposed) {
10185
+ state.pendingData.push(data);
10186
+ }
10330
10187
  return;
10331
10188
  }
10332
10189
  terminal.write(data);
@@ -10345,15 +10202,27 @@ const handleMouseDown = state => {
10345
10202
  focus(state);
10346
10203
  };
10347
10204
  const attachEvents = state => {
10348
- state.$Viewlet.addEventListener('mousedown', () => {
10205
+ if (state.mouseDownListener) {
10206
+ return;
10207
+ }
10208
+ state.mouseDownListener = () => {
10349
10209
  handleMouseDown(state);
10350
- });
10210
+ };
10211
+ state.$Viewlet.addEventListener('mousedown', state.mouseDownListener);
10351
10212
  };
10352
10213
  const dispose = state => {
10214
+ state.disposed = true;
10215
+ if (state.mouseDownListener) {
10216
+ state.$Viewlet.removeEventListener('mousedown', state.mouseDownListener);
10217
+ state.mouseDownListener = undefined;
10218
+ }
10353
10219
  for (const disposable of state.disposables) {
10354
10220
  disposable.dispose();
10355
10221
  }
10356
10222
  state.disposables = [];
10223
+ state.pendingData.length = 0;
10224
+ state.resizeObserver?.disconnect();
10225
+ state.resizeObserver = undefined;
10357
10226
  state.terminal?.dispose();
10358
10227
  state.terminal = undefined;
10359
10228
  };