@itwin/appui-abstract 4.0.0-dev.10 → 4.0.0-dev.101

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.
Files changed (132) hide show
  1. package/CHANGELOG.md +144 -1
  2. package/lib/cjs/appui-abstract/BaseUiItemsProvider.d.ts +5 -5
  3. package/lib/cjs/appui-abstract/BaseUiItemsProvider.d.ts.map +1 -1
  4. package/lib/cjs/appui-abstract/BaseUiItemsProvider.js +4 -3
  5. package/lib/cjs/appui-abstract/BaseUiItemsProvider.js.map +1 -1
  6. package/lib/cjs/appui-abstract/UiAdmin.js +1 -1
  7. package/lib/cjs/appui-abstract/UiAdmin.js.map +1 -1
  8. package/lib/cjs/appui-abstract/UiItemsManager.d.ts +6 -6
  9. package/lib/cjs/appui-abstract/UiItemsManager.d.ts.map +1 -1
  10. package/lib/cjs/appui-abstract/UiItemsManager.js +17 -22
  11. package/lib/cjs/appui-abstract/UiItemsManager.js.map +1 -1
  12. package/lib/cjs/appui-abstract/UiItemsProvider.d.ts +5 -4
  13. package/lib/cjs/appui-abstract/UiItemsProvider.d.ts.map +1 -1
  14. package/lib/cjs/appui-abstract/UiItemsProvider.js.map +1 -1
  15. package/lib/cjs/appui-abstract/backstage/BackstageItem.d.ts +3 -3
  16. package/lib/cjs/appui-abstract/backstage/BackstageItem.d.ts.map +1 -1
  17. package/lib/cjs/appui-abstract/backstage/BackstageItem.js +3 -3
  18. package/lib/cjs/appui-abstract/backstage/BackstageItem.js.map +1 -1
  19. package/lib/cjs/appui-abstract/backstage/BackstageItemsManager.js.map +1 -1
  20. package/lib/cjs/appui-abstract/content/StandardContentLayouts.js +1 -1
  21. package/lib/cjs/appui-abstract/content/StandardContentLayouts.js.map +1 -1
  22. package/lib/cjs/appui-abstract/dialogs/DialogItem.d.ts +1 -1
  23. package/lib/cjs/appui-abstract/dialogs/DialogItem.js.map +1 -1
  24. package/lib/cjs/appui-abstract/dialogs/UiLayoutDataProvider.js +1 -1
  25. package/lib/cjs/appui-abstract/dialogs/UiLayoutDataProvider.js.map +1 -1
  26. package/lib/cjs/appui-abstract/items/AbstractItemProps.d.ts +1 -1
  27. package/lib/cjs/appui-abstract/items/AbstractItemProps.d.ts.map +1 -1
  28. package/lib/cjs/appui-abstract/properties/Description.d.ts +1 -4
  29. package/lib/cjs/appui-abstract/properties/Description.d.ts.map +1 -1
  30. package/lib/cjs/appui-abstract/properties/Description.js.map +1 -1
  31. package/lib/cjs/appui-abstract/properties/EditorParams.d.ts +1 -1
  32. package/lib/cjs/appui-abstract/properties/EditorParams.d.ts.map +1 -1
  33. package/lib/cjs/appui-abstract/properties/Value.d.ts +1 -1
  34. package/lib/cjs/appui-abstract/properties/Value.d.ts.map +1 -1
  35. package/lib/cjs/appui-abstract/statusbar/StatusBarItem.d.ts +6 -6
  36. package/lib/cjs/appui-abstract/statusbar/StatusBarItem.d.ts.map +1 -1
  37. package/lib/cjs/appui-abstract/statusbar/StatusBarItem.js +1 -1
  38. package/lib/cjs/appui-abstract/statusbar/StatusBarItem.js.map +1 -1
  39. package/lib/cjs/appui-abstract/statusbar/StatusBarItemsManager.js.map +1 -1
  40. package/lib/cjs/appui-abstract/toolbars/ToolbarItem.d.ts +5 -5
  41. package/lib/cjs/appui-abstract/toolbars/ToolbarItem.d.ts.map +1 -1
  42. package/lib/cjs/appui-abstract/toolbars/ToolbarItem.js +1 -1
  43. package/lib/cjs/appui-abstract/toolbars/ToolbarItem.js.map +1 -1
  44. package/lib/cjs/appui-abstract/toolbars/ToolbarItemsManager.js.map +1 -1
  45. package/lib/cjs/appui-abstract/utils/IconSpecUtilities.d.ts +12 -0
  46. package/lib/cjs/appui-abstract/utils/IconSpecUtilities.d.ts.map +1 -1
  47. package/lib/cjs/appui-abstract/utils/IconSpecUtilities.js +20 -1
  48. package/lib/cjs/appui-abstract/utils/IconSpecUtilities.js.map +1 -1
  49. package/lib/cjs/appui-abstract/utils/callbacks.d.ts +4 -4
  50. package/lib/cjs/appui-abstract/utils/callbacks.d.ts.map +1 -1
  51. package/lib/cjs/appui-abstract/utils/filter/filters.d.ts +3 -3
  52. package/lib/cjs/appui-abstract/utils/filter/filters.d.ts.map +1 -1
  53. package/lib/cjs/appui-abstract/utils/filter/filters.js +28 -28
  54. package/lib/cjs/appui-abstract/utils/filter/filters.js.map +1 -1
  55. package/lib/cjs/appui-abstract/utils/filter/map.js +15 -17
  56. package/lib/cjs/appui-abstract/utils/filter/map.js.map +1 -1
  57. package/lib/cjs/appui-abstract/utils/filter/strings.js +2 -2
  58. package/lib/cjs/appui-abstract/utils/filter/strings.js.map +1 -1
  59. package/lib/cjs/appui-abstract/widget/AbstractWidgetProps.d.ts +24 -7
  60. package/lib/cjs/appui-abstract/widget/AbstractWidgetProps.d.ts.map +1 -1
  61. package/lib/cjs/appui-abstract/widget/AbstractWidgetProps.js.map +1 -1
  62. package/lib/cjs/appui-abstract/widget/StagePanel.d.ts +19 -4
  63. package/lib/cjs/appui-abstract/widget/StagePanel.d.ts.map +1 -1
  64. package/lib/cjs/appui-abstract/widget/StagePanel.js +21 -5
  65. package/lib/cjs/appui-abstract/widget/StagePanel.js.map +1 -1
  66. package/lib/cjs/appui-abstract.js +5 -1
  67. package/lib/cjs/appui-abstract.js.map +1 -1
  68. package/lib/esm/appui-abstract/BaseUiItemsProvider.d.ts +5 -5
  69. package/lib/esm/appui-abstract/BaseUiItemsProvider.d.ts.map +1 -1
  70. package/lib/esm/appui-abstract/BaseUiItemsProvider.js +4 -3
  71. package/lib/esm/appui-abstract/BaseUiItemsProvider.js.map +1 -1
  72. package/lib/esm/appui-abstract/UiAdmin.js +2 -1
  73. package/lib/esm/appui-abstract/UiAdmin.js.map +1 -1
  74. package/lib/esm/appui-abstract/UiItemsManager.d.ts +6 -6
  75. package/lib/esm/appui-abstract/UiItemsManager.d.ts.map +1 -1
  76. package/lib/esm/appui-abstract/UiItemsManager.js +18 -22
  77. package/lib/esm/appui-abstract/UiItemsManager.js.map +1 -1
  78. package/lib/esm/appui-abstract/UiItemsProvider.d.ts +5 -4
  79. package/lib/esm/appui-abstract/UiItemsProvider.d.ts.map +1 -1
  80. package/lib/esm/appui-abstract/UiItemsProvider.js.map +1 -1
  81. package/lib/esm/appui-abstract/backstage/BackstageItem.d.ts +3 -3
  82. package/lib/esm/appui-abstract/backstage/BackstageItem.d.ts.map +1 -1
  83. package/lib/esm/appui-abstract/backstage/BackstageItem.js +4 -3
  84. package/lib/esm/appui-abstract/backstage/BackstageItem.js.map +1 -1
  85. package/lib/esm/appui-abstract/backstage/BackstageItemsManager.js.map +1 -1
  86. package/lib/esm/appui-abstract/content/StandardContentLayouts.js +2 -1
  87. package/lib/esm/appui-abstract/content/StandardContentLayouts.js.map +1 -1
  88. package/lib/esm/appui-abstract/dialogs/DialogItem.d.ts +1 -1
  89. package/lib/esm/appui-abstract/dialogs/DialogItem.js.map +1 -1
  90. package/lib/esm/appui-abstract/dialogs/UiLayoutDataProvider.js +2 -1
  91. package/lib/esm/appui-abstract/dialogs/UiLayoutDataProvider.js.map +1 -1
  92. package/lib/esm/appui-abstract/items/AbstractItemProps.d.ts +1 -1
  93. package/lib/esm/appui-abstract/items/AbstractItemProps.d.ts.map +1 -1
  94. package/lib/esm/appui-abstract/properties/Description.d.ts +1 -4
  95. package/lib/esm/appui-abstract/properties/Description.d.ts.map +1 -1
  96. package/lib/esm/appui-abstract/properties/Description.js.map +1 -1
  97. package/lib/esm/appui-abstract/properties/EditorParams.d.ts +1 -1
  98. package/lib/esm/appui-abstract/properties/EditorParams.d.ts.map +1 -1
  99. package/lib/esm/appui-abstract/properties/Value.d.ts +1 -1
  100. package/lib/esm/appui-abstract/properties/Value.d.ts.map +1 -1
  101. package/lib/esm/appui-abstract/statusbar/StatusBarItem.d.ts +6 -6
  102. package/lib/esm/appui-abstract/statusbar/StatusBarItem.d.ts.map +1 -1
  103. package/lib/esm/appui-abstract/statusbar/StatusBarItem.js +2 -1
  104. package/lib/esm/appui-abstract/statusbar/StatusBarItem.js.map +1 -1
  105. package/lib/esm/appui-abstract/statusbar/StatusBarItemsManager.js.map +1 -1
  106. package/lib/esm/appui-abstract/toolbars/ToolbarItem.d.ts +5 -5
  107. package/lib/esm/appui-abstract/toolbars/ToolbarItem.d.ts.map +1 -1
  108. package/lib/esm/appui-abstract/toolbars/ToolbarItem.js +2 -1
  109. package/lib/esm/appui-abstract/toolbars/ToolbarItem.js.map +1 -1
  110. package/lib/esm/appui-abstract/toolbars/ToolbarItemsManager.js.map +1 -1
  111. package/lib/esm/appui-abstract/utils/IconSpecUtilities.d.ts +12 -0
  112. package/lib/esm/appui-abstract/utils/IconSpecUtilities.d.ts.map +1 -1
  113. package/lib/esm/appui-abstract/utils/IconSpecUtilities.js +21 -1
  114. package/lib/esm/appui-abstract/utils/IconSpecUtilities.js.map +1 -1
  115. package/lib/esm/appui-abstract/utils/callbacks.d.ts +4 -4
  116. package/lib/esm/appui-abstract/utils/callbacks.d.ts.map +1 -1
  117. package/lib/esm/appui-abstract/utils/filter/filters.d.ts +3 -3
  118. package/lib/esm/appui-abstract/utils/filter/filters.d.ts.map +1 -1
  119. package/lib/esm/appui-abstract/utils/filter/filters.js +28 -28
  120. package/lib/esm/appui-abstract/utils/filter/filters.js.map +1 -1
  121. package/lib/esm/appui-abstract/utils/filter/map.js +15 -17
  122. package/lib/esm/appui-abstract/utils/filter/map.js.map +1 -1
  123. package/lib/esm/appui-abstract/utils/filter/strings.js +2 -2
  124. package/lib/esm/appui-abstract/utils/filter/strings.js.map +1 -1
  125. package/lib/esm/appui-abstract/widget/AbstractWidgetProps.d.ts +24 -7
  126. package/lib/esm/appui-abstract/widget/AbstractWidgetProps.d.ts.map +1 -1
  127. package/lib/esm/appui-abstract/widget/AbstractWidgetProps.js.map +1 -1
  128. package/lib/esm/appui-abstract/widget/StagePanel.d.ts +19 -4
  129. package/lib/esm/appui-abstract/widget/StagePanel.d.ts.map +1 -1
  130. package/lib/esm/appui-abstract/widget/StagePanel.js +20 -4
  131. package/lib/esm/appui-abstract/widget/StagePanel.js.map +1 -1
  132. package/package.json +26 -19
@@ -5,11 +5,23 @@
5
5
  * @public
6
6
  */
7
7
  export declare class IconSpecUtilities {
8
+ /** Prefix for an SVG IconSpec loaded with the Sprite loader */
9
+ static readonly SVG_PREFIX = "svg:";
8
10
  static readonly WEB_COMPONENT_PREFIX = "webSvg:";
11
+ /** Create an IconSpec for an SVG loaded into web component with sprite loader
12
+ * This method is deprecated -- use createWebComponentIconSpec()
13
+ * @public @deprecated in 3.2. Please avoid using the Sprite loader and use IconSpecUtilities.createWebComponentIconSpec() instead.
14
+ */
15
+ static createSvgIconSpec(svgSrc: string): string;
9
16
  /** Create an IconSpec for an SVG loaded into web component with svg-loader
10
17
  * @public
11
18
  */
12
19
  static createWebComponentIconSpec(srcString: string): string;
20
+ /** Get the SVG Source from an sprite IconSpec
21
+ * This method is deprecated -- use getWebComponentSource()
22
+ * @public @deprecated in 3.2. avoid using the Sprite loader and use IconSpecUtilities.getWebComponentSource() instead.
23
+ */
24
+ static getSvgSource(iconSpec: string): string | undefined;
13
25
  /** Get the SVG Source from an svg-loader IconSpec
14
26
  * @public
15
27
  */
@@ -1 +1 @@
1
- {"version":3,"file":"IconSpecUtilities.d.ts","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/IconSpecUtilities.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,gBAAuB,oBAAoB,aAAa;IAExD;;MAEE;WACY,0BAA0B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAInE;;MAEE;WAEY,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;CAQ1E"}
1
+ {"version":3,"file":"IconSpecUtilities.d.ts","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/IconSpecUtilities.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,+DAA+D;IAC/D,gBAAuB,UAAU,UAAU;IAC3C,gBAAuB,oBAAoB,aAAa;IAExD;;;MAGE;WACY,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAGvD;;MAEE;WACY,0BAA0B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAInE;;;MAGE;WACY,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAOhE;;MAEE;WAEY,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;CAQ1E"}
@@ -8,13 +8,30 @@
8
8
  /** Creates an IconSpec with an SVG source and gets the SVG source from an IconSpec.
9
9
  * @public
10
10
  */
11
- export class IconSpecUtilities {
11
+ class IconSpecUtilities {
12
+ /** Create an IconSpec for an SVG loaded into web component with sprite loader
13
+ * This method is deprecated -- use createWebComponentIconSpec()
14
+ * @public @deprecated in 3.2. Please avoid using the Sprite loader and use IconSpecUtilities.createWebComponentIconSpec() instead.
15
+ */
16
+ static createSvgIconSpec(svgSrc) {
17
+ return `${IconSpecUtilities.SVG_PREFIX}${svgSrc}`;
18
+ }
12
19
  /** Create an IconSpec for an SVG loaded into web component with svg-loader
13
20
  * @public
14
21
  */
15
22
  static createWebComponentIconSpec(srcString) {
16
23
  return `${IconSpecUtilities.WEB_COMPONENT_PREFIX}${srcString}`;
17
24
  }
25
+ /** Get the SVG Source from an sprite IconSpec
26
+ * This method is deprecated -- use getWebComponentSource()
27
+ * @public @deprecated in 3.2. avoid using the Sprite loader and use IconSpecUtilities.getWebComponentSource() instead.
28
+ */
29
+ static getSvgSource(iconSpec) {
30
+ if (iconSpec.startsWith(IconSpecUtilities.SVG_PREFIX) && iconSpec.length > 4) {
31
+ return iconSpec.slice(4);
32
+ }
33
+ return undefined;
34
+ }
18
35
  /** Get the SVG Source from an svg-loader IconSpec
19
36
  * @public
20
37
  */
@@ -25,5 +42,8 @@ export class IconSpecUtilities {
25
42
  return undefined;
26
43
  }
27
44
  }
45
+ /** Prefix for an SVG IconSpec loaded with the Sprite loader */
46
+ IconSpecUtilities.SVG_PREFIX = "svg:";
28
47
  IconSpecUtilities.WEB_COMPONENT_PREFIX = "webSvg:";
48
+ export { IconSpecUtilities };
29
49
  //# sourceMappingURL=IconSpecUtilities.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconSpecUtilities.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/IconSpecUtilities.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;GAEG;AACH,MAAM,OAAO,iBAAiB;IAG5B;;MAEE;IACK,MAAM,CAAC,0BAA0B,CAAC,SAAiB;QACxD,OAAO,GAAG,iBAAiB,CAAC,oBAAoB,GAAG,SAAS,EAAE,CAAC;IACjE,CAAC;IAED;;MAEE;IAEK,MAAM,CAAC,qBAAqB,CAAC,QAAgB;QAClD,IAAI,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;YACtF,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SAC1B;QAED,OAAO,SAAS,CAAC;IAEnB,CAAC;;AApBsB,sCAAoB,GAAG,SAAS,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\n/** Creates an IconSpec with an SVG source and gets the SVG source from an IconSpec.\n * @public\n */\nexport class IconSpecUtilities {\n public static readonly WEB_COMPONENT_PREFIX = \"webSvg:\";\n\n /** Create an IconSpec for an SVG loaded into web component with svg-loader\n * @public\n */\n public static createWebComponentIconSpec(srcString: string): string {\n return `${IconSpecUtilities.WEB_COMPONENT_PREFIX}${srcString}`;\n }\n\n /** Get the SVG Source from an svg-loader IconSpec\n * @public\n */\n\n public static getWebComponentSource(iconSpec: string): string | undefined {\n if (iconSpec.startsWith(IconSpecUtilities.WEB_COMPONENT_PREFIX) && iconSpec.length > 7) {\n return iconSpec.slice(7);\n }\n\n return undefined;\n\n }\n}\n"]}
1
+ {"version":3,"file":"IconSpecUtilities.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/IconSpecUtilities.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;GAEG;AACH,MAAa,iBAAiB;IAK5B;;;MAGE;IACK,MAAM,CAAC,iBAAiB,CAAC,MAAc;QAC5C,OAAO,GAAG,iBAAiB,CAAC,UAAU,GAAG,MAAM,EAAE,CAAC;IACpD,CAAC;IACD;;MAEE;IACK,MAAM,CAAC,0BAA0B,CAAC,SAAiB;QACxD,OAAO,GAAG,iBAAiB,CAAC,oBAAoB,GAAG,SAAS,EAAE,CAAC;IACjE,CAAC;IAED;;;MAGE;IACK,MAAM,CAAC,YAAY,CAAC,QAAgB;QACzC,IAAI,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC,UAAU,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;YAC5E,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SAC1B;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IACD;;MAEE;IAEK,MAAM,CAAC,qBAAqB,CAAC,QAAgB;QAClD,IAAI,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;YACtF,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SAC1B;QAED,OAAO,SAAS,CAAC;IAEnB,CAAC;;AAxCD,+DAA+D;AACxC,4BAAU,GAAG,MAAM,CAAC;AACpB,sCAAoB,GAAG,SAAS,CAAC;SAH7C,iBAAiB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\n/** Creates an IconSpec with an SVG source and gets the SVG source from an IconSpec.\n * @public\n */\nexport class IconSpecUtilities {\n /** Prefix for an SVG IconSpec loaded with the Sprite loader */\n public static readonly SVG_PREFIX = \"svg:\";\n public static readonly WEB_COMPONENT_PREFIX = \"webSvg:\";\n\n /** Create an IconSpec for an SVG loaded into web component with sprite loader\n * This method is deprecated -- use createWebComponentIconSpec()\n * @public @deprecated in 3.2. Please avoid using the Sprite loader and use IconSpecUtilities.createWebComponentIconSpec() instead.\n */\n public static createSvgIconSpec(svgSrc: string): string {\n return `${IconSpecUtilities.SVG_PREFIX}${svgSrc}`;\n }\n /** Create an IconSpec for an SVG loaded into web component with svg-loader\n * @public\n */\n public static createWebComponentIconSpec(srcString: string): string {\n return `${IconSpecUtilities.WEB_COMPONENT_PREFIX}${srcString}`;\n }\n\n /** Get the SVG Source from an sprite IconSpec\n * This method is deprecated -- use getWebComponentSource()\n * @public @deprecated in 3.2. avoid using the Sprite loader and use IconSpecUtilities.getWebComponentSource() instead.\n */\n public static getSvgSource(iconSpec: string): string | undefined {\n if (iconSpec.startsWith(IconSpecUtilities.SVG_PREFIX) && iconSpec.length > 4) {\n return iconSpec.slice(4);\n }\n\n return undefined;\n }\n /** Get the SVG Source from an svg-loader IconSpec\n * @public\n */\n\n public static getWebComponentSource(iconSpec: string): string | undefined {\n if (iconSpec.startsWith(IconSpecUtilities.WEB_COMPONENT_PREFIX) && iconSpec.length > 7) {\n return iconSpec.slice(7);\n }\n\n return undefined;\n\n }\n}\n"]}
@@ -5,17 +5,17 @@ import { Primitives } from "../properties/PrimitiveTypes";
5
5
  /** Signature for number onCommit function.
6
6
  * @public
7
7
  */
8
- export declare type OnNumberCommitFunc = (value: number) => void;
8
+ export type OnNumberCommitFunc = (value: number) => void;
9
9
  /** Signature for value onCommit function.
10
10
  * @public
11
11
  */
12
- export declare type OnValueCommitFunc = (value: Primitives.Value) => void;
12
+ export type OnValueCommitFunc = (value: Primitives.Value) => void;
13
13
  /** Signature for onCancel function.
14
14
  * @public
15
15
  */
16
- export declare type OnCancelFunc = () => void;
16
+ export type OnCancelFunc = () => void;
17
17
  /** Signature for onItemExecuted function.
18
18
  * @public
19
19
  */
20
- export declare type OnItemExecutedFunc = (item: any) => void;
20
+ export type OnItemExecutedFunc = (item: any) => void;
21
21
  //# sourceMappingURL=callbacks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"callbacks.d.ts","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/callbacks.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D;;GAEG;AACH,oBAAY,kBAAkB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AAEzD;;GAEG;AACH,oBAAY,iBAAiB,GAAG,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,KAAK,IAAI,CAAC;AAElE;;GAEG;AACH,oBAAY,YAAY,GAAG,MAAM,IAAI,CAAC;AAEtC;;GAEG;AACH,oBAAY,kBAAkB,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC"}
1
+ {"version":3,"file":"callbacks.d.ts","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/callbacks.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,KAAK,IAAI,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC"}
@@ -14,7 +14,7 @@ export interface IMatch {
14
14
  * @param wordToMatchAgainst string to search for matches
15
15
  * @internal
16
16
  */
17
- export declare type IFilter = (word: string, wordToMatchAgainst: string) => IMatch[] | null;
17
+ export type IFilter = (word: string, wordToMatchAgainst: string) => IMatch[] | null;
18
18
  /**
19
19
  * @returns A filter which combines the provided set
20
20
  * of filters with an or. The *first* filters that
@@ -77,7 +77,7 @@ export declare function isPatternInWord(patternLow: string, patternPos: number,
77
77
  * 2. the offset at which matching started
78
78
  * @internal
79
79
  */
80
- export declare type FuzzyScore = [number, number, number];
80
+ export type FuzzyScore = [number, number, number];
81
81
  /** @internal */
82
82
  export declare namespace FuzzyScore {
83
83
  /**
@@ -89,7 +89,7 @@ export declare namespace FuzzyScore {
89
89
  function isDefault(score?: FuzzyScore): score is [-100, 0, 0];
90
90
  }
91
91
  /** @internal */
92
- export declare type FuzzyScorer = (pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, firstMatchCanBeWeak: boolean) => FuzzyScore | undefined;
92
+ export type FuzzyScorer = (pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, firstMatchCanBeWeak: boolean) => FuzzyScore | undefined;
93
93
  /** @internal */
94
94
  export declare function fuzzyScore(pattern: string, patternLow: string, patternStart: number, word: string, wordLow: string, wordStart: number, firstMatchCanBeWeak: boolean): FuzzyScore | undefined;
95
95
  /** @internal */
@@ -1 +1 @@
1
- {"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../../../../src/appui-abstract/utils/filter/filters.ts"],"names":[],"mappings":"AAIA;;GAEG;AAYH;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;;GAKG;AACH,oBAAY,OAAO,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,KAAK,MAAM,EAAE,GAAG,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EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,mBAAmB,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAmF5L;AAkID,gBAAgB;AAChB,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAE1M;AAED,gBAAgB;AAChB,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAEhM"}
@@ -86,19 +86,19 @@ function _matchesSubString(word, wordToMatchAgainst, i, j) {
86
86
  }
87
87
  // CamelCase
88
88
  function isLower(code) {
89
- return 97 /* a */ <= code && code <= 122 /* z */;
89
+ return 97 /* CharCode.a */ <= code && code <= 122 /* CharCode.z */;
90
90
  }
91
91
  function isUpper(code) {
92
- return 65 /* A */ <= code && code <= 90 /* Z */;
92
+ return 65 /* CharCode.A */ <= code && code <= 90 /* CharCode.Z */;
93
93
  }
94
94
  function isNumber(code) {
95
- return 48 /* Digit0 */ <= code && code <= 57 /* Digit9 */;
95
+ return 48 /* CharCode.Digit0 */ <= code && code <= 57 /* CharCode.Digit9 */;
96
96
  }
97
97
  function isWhitespace(code) {
98
- return (code === 32 /* Space */
99
- || code === 9 /* Tab */
100
- || code === 10 /* LineFeed */
101
- || code === 13 /* CarriageReturn */);
98
+ return (code === 32 /* CharCode.Space */
99
+ || code === 9 /* CharCode.Tab */
100
+ || code === 10 /* CharCode.LineFeed */
101
+ || code === 13 /* CharCode.CarriageReturn */);
102
102
  }
103
103
  const wordSeparators = new Set();
104
104
  '`~!@#$%^&*()-=+[{]}\\|;:\'",.<>/?'
@@ -388,16 +388,16 @@ function isSeparatorAtPos(value, index) {
388
388
  }
389
389
  const code = value.charCodeAt(index);
390
390
  switch (code) {
391
- case 95 /* Underline */:
392
- case 45 /* Dash */:
393
- case 46 /* Period */:
394
- case 32 /* Space */:
395
- case 47 /* Slash */:
396
- case 92 /* Backslash */:
397
- case 39 /* SingleQuote */:
398
- case 34 /* DoubleQuote */:
399
- case 58 /* Colon */:
400
- case 36 /* DollarSign */:
391
+ case 95 /* CharCode.Underline */:
392
+ case 45 /* CharCode.Dash */:
393
+ case 46 /* CharCode.Period */:
394
+ case 32 /* CharCode.Space */:
395
+ case 47 /* CharCode.Slash */:
396
+ case 92 /* CharCode.Backslash */:
397
+ case 39 /* CharCode.SingleQuote */:
398
+ case 34 /* CharCode.DoubleQuote */:
399
+ case 58 /* CharCode.Colon */:
400
+ case 36 /* CharCode.DollarSign */:
401
401
  return true;
402
402
  default:
403
403
  return false;
@@ -410,8 +410,8 @@ function isWhitespaceAtPos(value, index) {
410
410
  const code = value.charCodeAt(index);
411
411
  switch (code) {
412
412
  // istanbul ignore next
413
- case 32 /* Space */:
414
- case 9 /* Tab */:
413
+ case 32 /* CharCode.Space */:
414
+ case 9 /* CharCode.Tab */:
415
415
  return true;
416
416
  default:
417
417
  return false;
@@ -480,30 +480,30 @@ export function fuzzyScore(pattern, patternLow, patternStart, word, wordLow, wor
480
480
  // left or diag
481
481
  if (left > diag) {
482
482
  _table[row][column] = left;
483
- _arrows[row][column] = 4 /* Left */;
483
+ _arrows[row][column] = 4 /* Arrow.Left */;
484
484
  }
485
485
  else if (left === diag) {
486
486
  _table[row][column] = left;
487
- _arrows[row][column] = 4 /* Left */ | 2 /* Diag */;
487
+ _arrows[row][column] = 4 /* Arrow.Left */ | 2 /* Arrow.Diag */;
488
488
  }
489
489
  else {
490
490
  _table[row][column] = diag;
491
- _arrows[row][column] = 2 /* Diag */;
491
+ _arrows[row][column] = 2 /* Arrow.Diag */;
492
492
  }
493
493
  }
494
494
  else {
495
495
  // top or diag
496
496
  if (top > diag) {
497
497
  _table[row][column] = top;
498
- _arrows[row][column] = 1 /* Top */;
498
+ _arrows[row][column] = 1 /* Arrow.Top */;
499
499
  }
500
500
  else if (top === diag) {
501
501
  _table[row][column] = top;
502
- _arrows[row][column] = 1 /* Top */ | 2 /* Diag */;
502
+ _arrows[row][column] = 1 /* Arrow.Top */ | 2 /* Arrow.Diag */;
503
503
  }
504
504
  else {
505
505
  _table[row][column] = diag;
506
- _arrows[row][column] = 2 /* Diag */;
506
+ _arrows[row][column] = 2 /* Arrow.Diag */;
507
507
  }
508
508
  }
509
509
  }
@@ -574,7 +574,7 @@ function _findAllMatches2(row, column, total, matches, lastMatched) {
574
574
  while (row > 0 && column > 0) {
575
575
  const score = _scores[row][column];
576
576
  const arrow = _arrows[row][column];
577
- if (arrow === 4 /* Left */) {
577
+ if (arrow === 4 /* Arrow.Left */) {
578
578
  // left -> no match, skip a word character
579
579
  column -= 1;
580
580
  if (lastMatched) {
@@ -588,8 +588,8 @@ function _findAllMatches2(row, column, total, matches, lastMatched) {
588
588
  }
589
589
  else {
590
590
  /* istanbul ignore else */
591
- if (arrow & 2 /* Diag */) {
592
- if (arrow & 4 /* Left */) {
591
+ if (arrow & 2 /* Arrow.Diag */) {
592
+ if (arrow & 4 /* Arrow.Left */) {
593
593
  // left
594
594
  _findAllMatches2(row, column - 1, matches !== 0 ? total - 1 : total, // gap penalty after first match
595
595
  matches, lastMatched);
@@ -1 +1 @@
1
- {"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../src/appui-abstract/utils/filter/filters.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AASH,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC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AkB;IAE9D,uBAAuB;IACvB,IAAI,UAAU,GAAG,CAAC,IAAI,OAAO,CAAC,MAAM,EAAE;QACpC,OAAO,SAAS,CAAC;KAClB;IAED,MAAM,KAAK,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAClC,MAAM,KAAK,GAAG,OAAO,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;IAEtC,uBAAuB;IACvB,IAAI,KAAK,KAAK,KAAK,EAAE;QACnB,OAAO,SAAS,CAAC;KAClB;IAED,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC;UAC/B,KAAK;UACL,KAAK;UACL,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;AACpC,CAAC;AAED,aAAa","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\n// file copied from https://github.com/microsoft/vscode/blob/master/src/vs/base/common/filters.ts\n\n/* eslint-disable no-console */\n/* eslint-disable @typescript-eslint/naming-convention */\n/* eslint-disable no-restricted-syntax */\n\nimport { CharCode } from \"./charCode\";\nimport { LRUCache } from \"./map\";\nimport * as strings from \"./strings\";\n\n/** Interface that returns indices of matches\n * @public\n */\nexport interface IMatch {\n start: number;\n end: number;\n}\n\n/**\n * IFilter defines filter function type\n * @param word filter string\n * @param wordToMatchAgainst string to search for matches\n * @internal\n */\nexport type IFilter = (word: string, wordToMatchAgainst: string) => IMatch[] | null;\n\n// Combined filters\n\n/**\n * @returns A filter which combines the provided set\n * of filters with an or. The *first* filters that\n * matches defined the return value of the returned\n * filter.\n * @internal\n */\nexport function or(...filter: IFilter[]): IFilter {\n return function (word: string, wordToMatchAgainst: string): IMatch[] | null {\n for (let i = 0, len = filter.length; i < len; i++) {\n const match = filter[i](word, wordToMatchAgainst);\n if (match) {\n return match;\n }\n }\n return null;\n };\n}\n\n// Prefix\n\n/** @internal */\nexport const matchesStrictPrefix: IFilter = _matchesPrefix.bind(undefined, false);\n/** @internal */\nexport const matchesPrefix: IFilter = _matchesPrefix.bind(undefined, true);\n\nfunction _matchesPrefix(ignoreCase: boolean, word: string, wordToMatchAgainst: string): IMatch[] | null {\n if (!wordToMatchAgainst || wordToMatchAgainst.length < word.length) {\n return null;\n }\n\n let matches: boolean;\n if (ignoreCase) {\n matches = strings.startsWithIgnoreCase(wordToMatchAgainst, word);\n } else {\n matches = wordToMatchAgainst.indexOf(word) === 0;\n }\n\n if (!matches) {\n return null;\n }\n\n return word.length > 0 ? [{ start: 0, end: word.length }] : [];\n}\n\n// Contiguous Substring\n\n/** @internal */\nexport function matchesContiguousSubString(word: string, wordToMatchAgainst: string): IMatch[] | null {\n const index = wordToMatchAgainst.toLowerCase().indexOf(word.toLowerCase());\n if (index === -1) {\n return null;\n }\n\n return [{ start: index, end: index + word.length }];\n}\n\n// Substring\n\n/**\n * Return case insensitive substring matches\n * @param word filter string\n * @param wordToMatchAgainst string to test\n * @internal\n */\nexport function matchesSubString(word: string, wordToMatchAgainst: string): IMatch[] | null {\n return _matchesSubString(word.toLowerCase(), wordToMatchAgainst.toLowerCase(), 0, 0);\n}\n\nfunction _matchesSubString(word: string, wordToMatchAgainst: string, i: number, j: number): IMatch[] | null {\n if (i === word.length) {\n return [];\n } else if (j === wordToMatchAgainst.length) {\n return null;\n } else {\n if (word[i] === wordToMatchAgainst[j]) {\n let result: IMatch[] | null = null;\n if (result = _matchesSubString(word, wordToMatchAgainst, i + 1, j + 1)) {\n return join({ start: j, end: j + 1 }, result);\n }\n return null;\n }\n\n return _matchesSubString(word, wordToMatchAgainst, i, j + 1);\n }\n}\n\n// CamelCase\n\nfunction isLower(code: number): boolean {\n return CharCode.a <= code && code <= CharCode.z;\n}\n\nfunction isUpper(code: number): boolean {\n return CharCode.A <= code && code <= CharCode.Z;\n}\n\nfunction isNumber(code: number): boolean {\n return CharCode.Digit0 <= code && code <= CharCode.Digit9;\n}\n\nfunction isWhitespace(code: number): boolean {\n return (\n code === CharCode.Space\n || code === CharCode.Tab\n || code === CharCode.LineFeed\n || code === CharCode.CarriageReturn\n );\n}\n\nconst wordSeparators = new Set<number>();\n'`~!@#$%^&*()-=+[{]}\\\\|;:\\'\",.<>/?'\n .split(\"\")\n .forEach((s) => wordSeparators.add(s.charCodeAt(0)));\n\nfunction isWordSeparator(code: number): boolean {\n return isWhitespace(code) || wordSeparators.has(code);\n}\n\nfunction charactersMatch(codeA: number, codeB: number): boolean {\n return (codeA === codeB) || (isWordSeparator(codeA) && isWordSeparator(codeB));\n}\n\nfunction isAlphanumeric(code: number): boolean {\n return isLower(code) || isUpper(code) || isNumber(code);\n}\n\nfunction join(head: IMatch, tail: IMatch[]): IMatch[] {\n if (tail.length === 0) {\n tail = [head];\n } else if (head.end === tail[0].start) {\n tail[0].start = head.start;\n } else {\n tail.unshift(head);\n }\n return tail;\n}\n\nfunction nextAnchor(camelCaseWord: string, start: number): number {\n for (let i = start; i < camelCaseWord.length; i++) {\n const c = camelCaseWord.charCodeAt(i);\n if (isUpper(c) || isNumber(c) || (i > 0 && !isAlphanumeric(camelCaseWord.charCodeAt(i - 1)))) {\n return i;\n }\n }\n return camelCaseWord.length;\n}\n\nfunction _matchesCamelCase(word: string, camelCaseWord: string, i: number, j: number): IMatch[] | null {\n if (i === word.length) {\n return [];\n } else if (j === camelCaseWord.length) {\n return null;\n } else if (word[i] !== camelCaseWord[j].toLowerCase()) {\n return null;\n } else {\n let result: IMatch[] | null = null;\n let nextUpperIndex = j + 1;\n result = _matchesCamelCase(word, camelCaseWord, i + 1, j + 1);\n while (!result && (nextUpperIndex = nextAnchor(camelCaseWord, nextUpperIndex)) < camelCaseWord.length) {\n result = _matchesCamelCase(word, camelCaseWord, i + 1, nextUpperIndex);\n nextUpperIndex++;\n }\n return result === null ? null : join({ start: j, end: j + 1 }, result);\n }\n}\n\ninterface ICamelCaseAnalysis {\n upperPercent: number;\n lowerPercent: number;\n alphaPercent: number;\n numericPercent: number;\n}\n\n// Heuristic to avoid computing camel case matcher for words that don't\n// look like camelCaseWords.\nfunction analyzeCamelCaseWord(word: string): ICamelCaseAnalysis {\n let upper = 0, lower = 0, alpha = 0, numeric = 0, code = 0;\n\n for (let i = 0; i < word.length; i++) {\n code = word.charCodeAt(i);\n\n if (isUpper(code)) { upper++; }\n if (isLower(code)) { lower++; }\n if (isAlphanumeric(code)) { alpha++; }\n if (isNumber(code)) { numeric++; }\n }\n\n const upperPercent = upper / word.length;\n const lowerPercent = lower / word.length;\n const alphaPercent = alpha / word.length;\n const numericPercent = numeric / word.length;\n\n return { upperPercent, lowerPercent, alphaPercent, numericPercent };\n}\n\nfunction isUpperCaseWord(analysis: ICamelCaseAnalysis): boolean {\n const { upperPercent, lowerPercent } = analysis;\n return lowerPercent === 0 && upperPercent > 0.6;\n}\n\nfunction isCamelCaseWord(analysis: ICamelCaseAnalysis): boolean {\n const { upperPercent, lowerPercent, alphaPercent, numericPercent } = analysis;\n return lowerPercent > 0.2 && upperPercent < 0.8 && alphaPercent > 0.6 && numericPercent < 0.2;\n}\n\n// Heuristic to avoid computing camel case matcher for words that don't\n// look like camel case patterns.\nfunction isCamelCasePattern(word: string): boolean {\n let upper = 0, lower = 0, code = 0, whitespace = 0;\n\n for (let i = 0; i < word.length; i++) {\n code = word.charCodeAt(i);\n\n if (isUpper(code)) { upper++; }\n if (isLower(code)) { lower++; }\n if (isWhitespace(code)) { whitespace++; }\n }\n\n if ((upper === 0 || lower === 0) && whitespace === 0) {\n return word.length <= 30;\n } else {\n return upper <= 5;\n }\n}\n\n/**\n * Return matches treating \"camelCase\" words separately. For example the filter string \"gp\" would return two matches in string \"Git Pull\".\n * @param word filter string\n * @param wordToMatchAgainst string to test\n * @internal\n */\nexport function matchesCamelCase(word: string, camelCaseWord: string): IMatch[] | null {\n if (!camelCaseWord) {\n return null;\n }\n\n camelCaseWord = camelCaseWord.trim();\n\n if (camelCaseWord.length === 0) {\n return null;\n }\n\n if (!isCamelCasePattern(camelCaseWord)) {\n return null;\n }\n\n if (camelCaseWord.length > 60) {\n return null;\n }\n\n const analysis = analyzeCamelCaseWord(camelCaseWord);\n\n if (!isCamelCaseWord(analysis)) {\n // istanbul ignore next\n if (!isUpperCaseWord(analysis)) {\n return null;\n }\n\n camelCaseWord = camelCaseWord.toLowerCase();\n }\n\n let result: IMatch[] | null = null;\n let i = 0;\n\n word = word.toLowerCase();\n while (i < camelCaseWord.length && (result = _matchesCamelCase(word, camelCaseWord, 0, i)) === null) {\n i = nextAnchor(camelCaseWord, i + 1);\n }\n\n return result;\n}\n\n/**\n * Matches beginning of words supporting non-ASCII languages.\n * @param word Filter string\n * @param target String being searched\n * @param contiguous - If true the filter string must be found \"contiguous\" in the searched string (E.g. \"pul\" will match \"Git: Pull\").\n * Otherwise also matches sub string of the word with beginnings of the words in the target (e.g. \"gp\" or \"g p\" will match \"Git: Pull\").\n * Useful in cases where the target is words (e.g. command labels)\n * @internal\n */\nexport function matchesWords(word: string, target: string, contiguous: boolean = false): IMatch[] | null {\n if (!target || target.length === 0) {\n return null;\n }\n\n let result: IMatch[] | null = null;\n let i = 0;\n\n word = word.toLowerCase();\n target = target.toLowerCase();\n while (i < target.length && (result = _matchesWords(word, target, 0, i, contiguous)) === null) {\n i = nextWord(target, i + 1);\n }\n\n return result;\n}\n\nfunction _matchesWords(word: string, target: string, i: number, j: number, contiguous: boolean): IMatch[] | null {\n if (i === word.length) {\n return [];\n } else if (j === target.length) {\n return null;\n } else if (!charactersMatch(word.charCodeAt(i), target.charCodeAt(j))) {\n return null;\n } else {\n let result: IMatch[] | null = null;\n let nextWordIndex = j + 1;\n result = _matchesWords(word, target, i + 1, j + 1, contiguous);\n // istanbul ignore else\n if (!contiguous) {\n while (!result && (nextWordIndex = nextWord(target, nextWordIndex)) < target.length) {\n result = _matchesWords(word, target, i + 1, nextWordIndex, contiguous);\n nextWordIndex++;\n }\n }\n return result === null ? null : join({ start: j, end: j + 1 }, result);\n }\n}\n\nfunction nextWord(word: string, start: number): number {\n for (let i = start; i < word.length; i++) {\n if (isWordSeparator(word.charCodeAt(i)) ||\n (i > 0 && isWordSeparator(word.charCodeAt(i - 1)))) {\n return i;\n }\n }\n return word.length;\n}\n\n// Fuzzy\n\nconst fuzzyContiguousFilter = or(matchesPrefix, matchesCamelCase, matchesContiguousSubString);\nconst fuzzySeparateFilter = or(matchesPrefix, matchesCamelCase, matchesSubString);\nconst fuzzyRegExpCache = new LRUCache<string, RegExp>(10000); // bounded to 10000 elements\n\n/**\n * Match pattern against word in a fuzzy way. This will only return a single match.\n * @internal\n */\nexport function matchesFuzzy(word: string, wordToMatchAgainst: string, enableSeparateSubstringMatching = false): IMatch[] | null {\n // istanbul ignore next\n if (typeof word !== \"string\" || typeof wordToMatchAgainst !== \"string\") {\n return null; // return early for invalid input\n }\n\n // Form RegExp for wildcard matches\n let regexp = fuzzyRegExpCache.get(word);\n if (!regexp) {\n regexp = new RegExp(strings.convertSimple2RegExpPattern(word), \"i\");\n fuzzyRegExpCache.set(word, regexp);\n }\n\n // RegExp Filter\n const match = regexp.exec(wordToMatchAgainst);\n if (match) {\n return [{ start: match.index, end: match.index + match[0].length }];\n }\n\n // Default Filter\n return enableSeparateSubstringMatching ? /* istanbul ignore next */ fuzzySeparateFilter(word, wordToMatchAgainst) : fuzzyContiguousFilter(word, wordToMatchAgainst);\n}\n\n/**\n * Match pattern against word in a fuzzy way. As in IntelliSense and faster and more\n * powerful than `matchesFuzzy`. This will only return a single match.\n * @internal\n */\nexport function matchesFuzzy2(pattern: string, word: string): IMatch[] | null {\n const score = fuzzyScore(pattern, pattern.toLowerCase(), 0, word, word.toLowerCase(), 0, true);\n return score ? createMatches(score) : null;\n}\n\n// #region --- fuzzyScore ---\n/**\n * @internal\n */\nexport function createMatches(score: undefined | FuzzyScore): IMatch[] {\n // istanbul ignore next\n if (typeof score === \"undefined\") {\n return [];\n }\n\n const matches = score[1].toString(2);\n const wordStart = score[2];\n const res: IMatch[] = [];\n\n for (let pos = wordStart; pos < _maxLen; pos++) {\n if (matches[matches.length - (pos + 1)] === \"1\") {\n const last = res[res.length - 1];\n if (last && last.end === pos) {\n last.end = pos + 1;\n } else {\n res.push({ start: pos, end: pos + 1 });\n }\n }\n }\n return res;\n}\n\nconst _maxLen = 128;\n\nfunction initTable() {\n const table: number[][] = [];\n const row: number[] = [0];\n for (let i = 1; i <= _maxLen; i++) {\n row.push(-i);\n }\n for (let i = 0; i <= _maxLen; i++) {\n const thisRow = row.slice(0);\n thisRow[0] = -i;\n table.push(thisRow);\n }\n return table;\n}\n\nconst _table = initTable();\nconst _scores = initTable();\n// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\nconst _arrows = <Arrow[][]>initTable();\nconst _debug = false;\n\nfunction isSeparatorAtPos(value: string, index: number): boolean {\n if (index < 0 || index >= value.length) {\n return false;\n }\n const code = value.charCodeAt(index);\n switch (code) {\n case CharCode.Underline:\n case CharCode.Dash:\n case CharCode.Period:\n case CharCode.Space:\n case CharCode.Slash:\n case CharCode.Backslash:\n case CharCode.SingleQuote:\n case CharCode.DoubleQuote:\n case CharCode.Colon:\n case CharCode.DollarSign:\n return true;\n default:\n return false;\n }\n}\n\nfunction isWhitespaceAtPos(value: string, index: number): boolean {\n if (index < 0 || index >= value.length) {\n return false;\n }\n const code = value.charCodeAt(index);\n switch (code) {\n // istanbul ignore next\n case CharCode.Space:\n case CharCode.Tab:\n return true;\n default:\n return false;\n }\n}\n\nfunction isUpperCaseAtPos(pos: number, word: string, wordLow: string): boolean {\n return word[pos] !== wordLow[pos];\n}\n\n/** @internal */\nexport function isPatternInWord(patternLow: string, patternPos: number, patternLen: number, wordLow: string, wordPos: number, wordLen: number): boolean {\n while (patternPos < patternLen && wordPos < wordLen) {\n if (patternLow[patternPos] === wordLow[wordPos]) {\n patternPos += 1;\n }\n wordPos += 1;\n }\n return patternPos === patternLen; // pattern must be exhausted\n}\n\nconst enum Arrow { Top = 0b1, Diag = 0b10, Left = 0b100 }\n\n/**\n * A tuple of three values.\n * 0. the score\n * 1. the matches encoded as bitmask (2^53)\n * 2. the offset at which matching started\n * @internal\n */\nexport type FuzzyScore = [number, number, number];\n\n/** @internal */\nexport namespace FuzzyScore { // eslint-disable-line @typescript-eslint/no-redeclare\n /**\n * No matches and value `-100`\n * @internal\n */\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n export const Default: [-100, 0, 0] = <[-100, 0, 0]>Object.freeze([-100, 0, 0]);\n\n // istanbul ignore next\n /** @internal */\n export function isDefault(score?: FuzzyScore): score is [-100, 0, 0] {\n return !score || (score[0] === -100 && score[1] === 0 && score[2] === 0);\n }\n}\n\n/** @internal */\nexport type FuzzyScorer = (pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, firstMatchCanBeWeak: boolean) => FuzzyScore | undefined;\n\n/** @internal */\nexport function fuzzyScore(pattern: string, patternLow: string, patternStart: number, word: string, wordLow: string, wordStart: number, firstMatchCanBeWeak: boolean): FuzzyScore | undefined {\n // istanbul ignore next\n const patternLen = pattern.length > _maxLen ? _maxLen : pattern.length;\n const wordLen = word.length > _maxLen ? _maxLen : word.length;\n\n if (patternStart >= patternLen || wordStart >= wordLen || (patternLen - patternStart) > (wordLen - wordStart)) {\n return undefined;\n }\n\n // Run a simple check if the characters of pattern occur\n // (in order) at all in word. If that isn't the case we\n // stop because no match will be possible\n if (!isPatternInWord(patternLow, patternStart, patternLen, wordLow, wordStart, wordLen)) {\n return undefined;\n }\n\n let row: number = 1;\n let column: number = 1;\n let patternPos = patternStart;\n let wordPos = wordStart;\n\n let hasStrongFirstMatch = false;\n\n // There will be a match, fill in tables\n for (row = 1, patternPos = patternStart; patternPos < patternLen; row++, patternPos++) {\n\n for (column = 1, wordPos = wordStart; wordPos < wordLen; column++, wordPos++) {\n\n const score = _doScore(pattern, patternLow, patternPos, patternStart, word, wordLow, wordPos);\n\n if (patternPos === patternStart && score > 1) {\n hasStrongFirstMatch = true;\n }\n\n _scores[row][column] = score;\n\n const diag = _table[row - 1][column - 1] + (score > 1 ? 1 : score);\n const top = _table[row - 1][column] + -1;\n const left = _table[row][column - 1] + -1;\n\n if (left >= top) {\n // left or diag\n if (left > diag) {\n _table[row][column] = left;\n _arrows[row][column] = Arrow.Left;\n } else if (left === diag) {\n _table[row][column] = left;\n _arrows[row][column] = Arrow.Left | Arrow.Diag;\n } else {\n _table[row][column] = diag;\n _arrows[row][column] = Arrow.Diag;\n }\n } else {\n // top or diag\n if (top > diag) {\n _table[row][column] = top;\n _arrows[row][column] = Arrow.Top;\n } else if (top === diag) {\n _table[row][column] = top;\n _arrows[row][column] = Arrow.Top | Arrow.Diag;\n } else {\n _table[row][column] = diag;\n _arrows[row][column] = Arrow.Diag;\n }\n }\n }\n }\n\n if (!hasStrongFirstMatch && !firstMatchCanBeWeak) {\n return undefined;\n }\n\n _matchesCount = 0;\n _topScore = -100;\n _wordStart = wordStart;\n _firstMatchCanBeWeak = firstMatchCanBeWeak;\n\n _findAllMatches2(row - 1, column - 1, patternLen === wordLen ? 1 : 0, 0, false);\n if (_matchesCount === 0) {\n return undefined;\n }\n\n return [_topScore, _topMatch2, wordStart];\n}\n\nfunction _doScore(pattern: string, patternLow: string, patternPos: number, patternStart: number, word: string, wordLow: string, wordPos: number) {\n if (patternLow[patternPos] !== wordLow[wordPos]) {\n return -1;\n }\n if (wordPos === (patternPos - patternStart)) {\n // common prefix: `foobar <-> foobaz`\n // ^^^^^\n if (pattern[patternPos] === word[wordPos]) {\n return 7;\n } else {\n return 5;\n }\n } else if (isUpperCaseAtPos(wordPos, word, wordLow) && (wordPos === 0 || !isUpperCaseAtPos(wordPos - 1, word, wordLow))) {\n // hitting upper-case: `foo <-> forOthers`\n // ^^ ^\n if (pattern[patternPos] === word[wordPos]) {\n return 7;\n } else {\n return 5;\n }\n } else if (isSeparatorAtPos(wordLow, wordPos) && (wordPos === 0 || !isSeparatorAtPos(wordLow, wordPos - 1))) {\n // hitting a separator: `. <-> foo.bar`\n // ^\n return 5;\n\n } else if (isSeparatorAtPos(wordLow, wordPos - 1) || isWhitespaceAtPos(wordLow, wordPos - 1)) {\n // post separator: `foo <-> bar_foo`\n // ^^^\n return 5;\n\n } else {\n return 1;\n }\n}\n\nlet _matchesCount: number = 0;\nlet _topMatch2: number = 0;\nlet _topScore: number = 0;\nlet _wordStart: number = 0;\nlet _firstMatchCanBeWeak: boolean = false;\n\nfunction _findAllMatches2(row: number, column: number, total: number, matches: number, lastMatched: boolean): void {\n\n if (_matchesCount >= 10 || total < -25) {\n // stop when having already 10 results, or\n // when a potential alignment as already 5 gaps\n return;\n }\n\n let simpleMatchCount = 0;\n\n while (row > 0 && column > 0) {\n\n const score = _scores[row][column];\n const arrow = _arrows[row][column];\n\n if (arrow === Arrow.Left) {\n // left -> no match, skip a word character\n column -= 1;\n if (lastMatched) {\n total -= 5; // new gap penalty\n } else if (matches !== 0) {\n total -= 1; // gap penalty after first match\n }\n lastMatched = false;\n simpleMatchCount = 0;\n } else {\n /* istanbul ignore else */\n if (arrow & Arrow.Diag) {\n if (arrow & Arrow.Left) {\n // left\n _findAllMatches2(\n row,\n column - 1,\n matches !== 0 ? total - 1 : total, // gap penalty after first match\n matches,\n lastMatched\n );\n }\n\n // diag\n total += score;\n row -= 1;\n column -= 1;\n lastMatched = true;\n\n // match -> set a 1 at the word pos\n matches += 2 ** (column + _wordStart);\n\n // count simple matches and boost a row of\n // simple matches when they yield in a\n // strong match.\n if (score === 1) {\n simpleMatchCount += 1;\n\n if (row === 0 && !_firstMatchCanBeWeak) {\n // when the first match is a weak\n // match we discard it\n return undefined;\n }\n\n } else {\n // boost\n total += 1 + (simpleMatchCount * (score - 1));\n simpleMatchCount = 0;\n }\n\n } else {\n // istanbul ignore next\n return undefined;\n }\n }\n }\n\n total -= column >= 3 ? 9 : column * 3; // late start penalty\n\n // dynamically keep track of the current top score\n // and insert the current best score at head, the rest at tail\n _matchesCount += 1;\n if (total > _topScore) {\n _topScore = total;\n _topMatch2 = matches;\n }\n}\n\n// #endregion\n\n// #region --- graceful ---\n/** @internal */\nexport function fuzzyScoreGracefulAggressive(pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, firstMatchCanBeWeak: boolean): FuzzyScore | undefined {\n return fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, true, firstMatchCanBeWeak);\n}\n\n/** @internal */\nexport function fuzzyScoreGraceful(pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, firstMatchCanBeWeak: boolean): FuzzyScore | undefined {\n return fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, false, firstMatchCanBeWeak);\n}\n\nfunction fuzzyScoreWithPermutations(pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, aggressive: boolean, firstMatchCanBeWeak: boolean): FuzzyScore | undefined {\n let top = fuzzyScore(pattern, lowPattern, patternPos, word, lowWord, wordPos, firstMatchCanBeWeak);\n\n if (top && !aggressive) {\n // when using the original pattern yield a result we`\n // return it unless we are aggressive and try to find\n // a better alignment, e.g. `cno` -> `^co^ns^ole` or `^c^o^nsole`.\n return top;\n }\n\n // istanbul ignore else\n if (pattern.length >= 3) {\n // When the pattern is long enough then try a few (max 7)\n // permutations of the pattern to find a better match. The\n // permutations only swap neighbouring characters, e.g\n // `cnoso` becomes `conso`, `cnsoo`, `cnoos`.\n const tries = Math.min(7, pattern.length - 1);\n for (let movingPatternPos = patternPos + 1; movingPatternPos < tries; movingPatternPos++) {\n const newPattern = nextTypoPermutation(pattern, movingPatternPos);\n // istanbul ignore else\n if (newPattern) {\n const candidate = fuzzyScore(newPattern, newPattern.toLowerCase(), patternPos, word, lowWord, wordPos, firstMatchCanBeWeak);\n if (candidate) {\n candidate[0] -= 3; // permutation penalty\n // istanbul ignore else\n if (!top || candidate[0] > top[0]) {\n top = candidate;\n }\n }\n }\n }\n }\n\n return top;\n}\n\nfunction nextTypoPermutation(pattern: string, patternPos: number): string | undefined {\n\n // istanbul ignore next\n if (patternPos + 1 >= pattern.length) {\n return undefined;\n }\n\n const swap1 = pattern[patternPos];\n const swap2 = pattern[patternPos + 1];\n\n // istanbul ignore next\n if (swap1 === swap2) {\n return undefined;\n }\n\n return pattern.slice(0, patternPos)\n + swap2\n + swap1\n + pattern.slice(patternPos + 2);\n}\n\n// #endregion\n"]}
1
+ {"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../src/appui-abstract/utils/filter/filters.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AASH,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAkBrC,mBAAmB;AAEnB;;;;;;GAMG;AACH,MAAM,UAAU,EAAE,CAAC,GAAG,MAAiB;IACrC,OAAO,UAAU,IAAY,EAAE,kBAA0B;QACvD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;YACjD,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;YAClD,IAAI,KAAK,EAAE;gBACT,OAAO,KAAK,CAAC;aACd;SACF;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC;AAED,SAAS;AAET,gBAAgB;AAChB,MAAM,CAAC,MAAM,mBAAmB,GAAY,cAAc,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;AAClF,gBAAgB;AAChB,MAAM,CAAC,MAAM,aAAa,GAAY,cAAc,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAE3E,SAAS,cAAc,CAAC,UAAmB,EAAE,IAAY,EAAE,kBAA0B;IACnF,IAAI,CAAC,kBAAkB,IAAI,kBAAkB,CAAC,MAAM,GAAG,IAAI,C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UAAU,CAAC,WAAW,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,mBAAmB,CAAC,CAAC;gBAC5H,IAAI,SAAS,EAAE;oBACb,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,sBAAsB;oBACzC,uBAAuB;oBACvB,IAAI,CAAC,GAAG,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE;wBACjC,GAAG,GAAG,SAAS,CAAC;qBACjB;iBACF;aACF;SACF;KACF;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,mBAAmB,CAAC,OAAe,EAAE,UAAkB;IAE9D,uBAAuB;IACvB,IAAI,UAAU,GAAG,CAAC,IAAI,OAAO,CAAC,MAAM,EAAE;QACpC,OAAO,SAAS,CAAC;KAClB;IAED,MAAM,KAAK,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAClC,MAAM,KAAK,GAAG,OAAO,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;IAEtC,uBAAuB;IACvB,IAAI,KAAK,KAAK,KAAK,EAAE;QACnB,OAAO,SAAS,CAAC;KAClB;IAED,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC;UAC/B,KAAK;UACL,KAAK;UACL,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;AACpC,CAAC;AAED,aAAa","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\n// file copied from https://github.com/microsoft/vscode/blob/master/src/vs/base/common/filters.ts\n\n/* eslint-disable no-console */\n/* eslint-disable @typescript-eslint/naming-convention */\n/* eslint-disable no-restricted-syntax */\n\nimport { CharCode } from \"./charCode\";\nimport { LRUCache } from \"./map\";\nimport * as strings from \"./strings\";\n\n/** Interface that returns indices of matches\n * @public\n */\nexport interface IMatch {\n start: number;\n end: number;\n}\n\n/**\n * IFilter defines filter function type\n * @param word filter string\n * @param wordToMatchAgainst string to search for matches\n * @internal\n */\nexport type IFilter = (word: string, wordToMatchAgainst: string) => IMatch[] | null;\n\n// Combined filters\n\n/**\n * @returns A filter which combines the provided set\n * of filters with an or. The *first* filters that\n * matches defined the return value of the returned\n * filter.\n * @internal\n */\nexport function or(...filter: IFilter[]): IFilter {\n return function (word: string, wordToMatchAgainst: string): IMatch[] | null {\n for (let i = 0, len = filter.length; i < len; i++) {\n const match = filter[i](word, wordToMatchAgainst);\n if (match) {\n return match;\n }\n }\n return null;\n };\n}\n\n// Prefix\n\n/** @internal */\nexport const matchesStrictPrefix: IFilter = _matchesPrefix.bind(undefined, false);\n/** @internal */\nexport const matchesPrefix: IFilter = _matchesPrefix.bind(undefined, true);\n\nfunction _matchesPrefix(ignoreCase: boolean, word: string, wordToMatchAgainst: string): IMatch[] | null {\n if (!wordToMatchAgainst || wordToMatchAgainst.length < word.length) {\n return null;\n }\n\n let matches: boolean;\n if (ignoreCase) {\n matches = strings.startsWithIgnoreCase(wordToMatchAgainst, word);\n } else {\n matches = wordToMatchAgainst.indexOf(word) === 0;\n }\n\n if (!matches) {\n return null;\n }\n\n return word.length > 0 ? [{ start: 0, end: word.length }] : [];\n}\n\n// Contiguous Substring\n\n/** @internal */\nexport function matchesContiguousSubString(word: string, wordToMatchAgainst: string): IMatch[] | null {\n const index = wordToMatchAgainst.toLowerCase().indexOf(word.toLowerCase());\n if (index === -1) {\n return null;\n }\n\n return [{ start: index, end: index + word.length }];\n}\n\n// Substring\n\n/**\n * Return case insensitive substring matches\n * @param word filter string\n * @param wordToMatchAgainst string to test\n * @internal\n */\nexport function matchesSubString(word: string, wordToMatchAgainst: string): IMatch[] | null {\n return _matchesSubString(word.toLowerCase(), wordToMatchAgainst.toLowerCase(), 0, 0);\n}\n\nfunction _matchesSubString(word: string, wordToMatchAgainst: string, i: number, j: number): IMatch[] | null {\n if (i === word.length) {\n return [];\n } else if (j === wordToMatchAgainst.length) {\n return null;\n } else {\n if (word[i] === wordToMatchAgainst[j]) {\n let result: IMatch[] | null = null;\n if (result = _matchesSubString(word, wordToMatchAgainst, i + 1, j + 1)) {\n return join({ start: j, end: j + 1 }, result);\n }\n return null;\n }\n\n return _matchesSubString(word, wordToMatchAgainst, i, j + 1);\n }\n}\n\n// CamelCase\n\nfunction isLower(code: number): boolean {\n return CharCode.a <= code && code <= CharCode.z;\n}\n\nfunction isUpper(code: number): boolean {\n return CharCode.A <= code && code <= CharCode.Z;\n}\n\nfunction isNumber(code: number): boolean {\n return CharCode.Digit0 <= code && code <= CharCode.Digit9;\n}\n\nfunction isWhitespace(code: number): boolean {\n return (\n code === CharCode.Space\n || code === CharCode.Tab\n || code === CharCode.LineFeed\n || code === CharCode.CarriageReturn\n );\n}\n\nconst wordSeparators = new Set<number>();\n'`~!@#$%^&*()-=+[{]}\\\\|;:\\'\",.<>/?'\n .split(\"\")\n .forEach((s) => wordSeparators.add(s.charCodeAt(0)));\n\nfunction isWordSeparator(code: number): boolean {\n return isWhitespace(code) || wordSeparators.has(code);\n}\n\nfunction charactersMatch(codeA: number, codeB: number): boolean {\n return (codeA === codeB) || (isWordSeparator(codeA) && isWordSeparator(codeB));\n}\n\nfunction isAlphanumeric(code: number): boolean {\n return isLower(code) || isUpper(code) || isNumber(code);\n}\n\nfunction join(head: IMatch, tail: IMatch[]): IMatch[] {\n if (tail.length === 0) {\n tail = [head];\n } else if (head.end === tail[0].start) {\n tail[0].start = head.start;\n } else {\n tail.unshift(head);\n }\n return tail;\n}\n\nfunction nextAnchor(camelCaseWord: string, start: number): number {\n for (let i = start; i < camelCaseWord.length; i++) {\n const c = camelCaseWord.charCodeAt(i);\n if (isUpper(c) || isNumber(c) || (i > 0 && !isAlphanumeric(camelCaseWord.charCodeAt(i - 1)))) {\n return i;\n }\n }\n return camelCaseWord.length;\n}\n\nfunction _matchesCamelCase(word: string, camelCaseWord: string, i: number, j: number): IMatch[] | null {\n if (i === word.length) {\n return [];\n } else if (j === camelCaseWord.length) {\n return null;\n } else if (word[i] !== camelCaseWord[j].toLowerCase()) {\n return null;\n } else {\n let result: IMatch[] | null = null;\n let nextUpperIndex = j + 1;\n result = _matchesCamelCase(word, camelCaseWord, i + 1, j + 1);\n while (!result && (nextUpperIndex = nextAnchor(camelCaseWord, nextUpperIndex)) < camelCaseWord.length) {\n result = _matchesCamelCase(word, camelCaseWord, i + 1, nextUpperIndex);\n nextUpperIndex++;\n }\n return result === null ? null : join({ start: j, end: j + 1 }, result);\n }\n}\n\ninterface ICamelCaseAnalysis {\n upperPercent: number;\n lowerPercent: number;\n alphaPercent: number;\n numericPercent: number;\n}\n\n// Heuristic to avoid computing camel case matcher for words that don't\n// look like camelCaseWords.\nfunction analyzeCamelCaseWord(word: string): ICamelCaseAnalysis {\n let upper = 0, lower = 0, alpha = 0, numeric = 0, code = 0;\n\n for (let i = 0; i < word.length; i++) {\n code = word.charCodeAt(i);\n\n if (isUpper(code)) { upper++; }\n if (isLower(code)) { lower++; }\n if (isAlphanumeric(code)) { alpha++; }\n if (isNumber(code)) { numeric++; }\n }\n\n const upperPercent = upper / word.length;\n const lowerPercent = lower / word.length;\n const alphaPercent = alpha / word.length;\n const numericPercent = numeric / word.length;\n\n return { upperPercent, lowerPercent, alphaPercent, numericPercent };\n}\n\nfunction isUpperCaseWord(analysis: ICamelCaseAnalysis): boolean {\n const { upperPercent, lowerPercent } = analysis;\n return lowerPercent === 0 && upperPercent > 0.6;\n}\n\nfunction isCamelCaseWord(analysis: ICamelCaseAnalysis): boolean {\n const { upperPercent, lowerPercent, alphaPercent, numericPercent } = analysis;\n return lowerPercent > 0.2 && upperPercent < 0.8 && alphaPercent > 0.6 && numericPercent < 0.2;\n}\n\n// Heuristic to avoid computing camel case matcher for words that don't\n// look like camel case patterns.\nfunction isCamelCasePattern(word: string): boolean {\n let upper = 0, lower = 0, code = 0, whitespace = 0;\n\n for (let i = 0; i < word.length; i++) {\n code = word.charCodeAt(i);\n\n if (isUpper(code)) { upper++; }\n if (isLower(code)) { lower++; }\n if (isWhitespace(code)) { whitespace++; }\n }\n\n if ((upper === 0 || lower === 0) && whitespace === 0) {\n return word.length <= 30;\n } else {\n return upper <= 5;\n }\n}\n\n/**\n * Return matches treating \"camelCase\" words separately. For example the filter string \"gp\" would return two matches in string \"Git Pull\".\n * @param word filter string\n * @param wordToMatchAgainst string to test\n * @internal\n */\nexport function matchesCamelCase(word: string, camelCaseWord: string): IMatch[] | null {\n if (!camelCaseWord) {\n return null;\n }\n\n camelCaseWord = camelCaseWord.trim();\n\n if (camelCaseWord.length === 0) {\n return null;\n }\n\n if (!isCamelCasePattern(camelCaseWord)) {\n return null;\n }\n\n if (camelCaseWord.length > 60) {\n return null;\n }\n\n const analysis = analyzeCamelCaseWord(camelCaseWord);\n\n if (!isCamelCaseWord(analysis)) {\n // istanbul ignore next\n if (!isUpperCaseWord(analysis)) {\n return null;\n }\n\n camelCaseWord = camelCaseWord.toLowerCase();\n }\n\n let result: IMatch[] | null = null;\n let i = 0;\n\n word = word.toLowerCase();\n while (i < camelCaseWord.length && (result = _matchesCamelCase(word, camelCaseWord, 0, i)) === null) {\n i = nextAnchor(camelCaseWord, i + 1);\n }\n\n return result;\n}\n\n/**\n * Matches beginning of words supporting non-ASCII languages.\n * @param word Filter string\n * @param target String being searched\n * @param contiguous - If true the filter string must be found \"contiguous\" in the searched string (E.g. \"pul\" will match \"Git: Pull\").\n * Otherwise also matches sub string of the word with beginnings of the words in the target (e.g. \"gp\" or \"g p\" will match \"Git: Pull\").\n * Useful in cases where the target is words (e.g. command labels)\n * @internal\n */\nexport function matchesWords(word: string, target: string, contiguous: boolean = false): IMatch[] | null {\n if (!target || target.length === 0) {\n return null;\n }\n\n let result: IMatch[] | null = null;\n let i = 0;\n\n word = word.toLowerCase();\n target = target.toLowerCase();\n while (i < target.length && (result = _matchesWords(word, target, 0, i, contiguous)) === null) {\n i = nextWord(target, i + 1);\n }\n\n return result;\n}\n\nfunction _matchesWords(word: string, target: string, i: number, j: number, contiguous: boolean): IMatch[] | null {\n if (i === word.length) {\n return [];\n } else if (j === target.length) {\n return null;\n } else if (!charactersMatch(word.charCodeAt(i), target.charCodeAt(j))) {\n return null;\n } else {\n let result: IMatch[] | null = null;\n let nextWordIndex = j + 1;\n result = _matchesWords(word, target, i + 1, j + 1, contiguous);\n // istanbul ignore else\n if (!contiguous) {\n while (!result && (nextWordIndex = nextWord(target, nextWordIndex)) < target.length) {\n result = _matchesWords(word, target, i + 1, nextWordIndex, contiguous);\n nextWordIndex++;\n }\n }\n return result === null ? null : join({ start: j, end: j + 1 }, result);\n }\n}\n\nfunction nextWord(word: string, start: number): number {\n for (let i = start; i < word.length; i++) {\n if (isWordSeparator(word.charCodeAt(i)) ||\n (i > 0 && isWordSeparator(word.charCodeAt(i - 1)))) {\n return i;\n }\n }\n return word.length;\n}\n\n// Fuzzy\n\nconst fuzzyContiguousFilter = or(matchesPrefix, matchesCamelCase, matchesContiguousSubString);\nconst fuzzySeparateFilter = or(matchesPrefix, matchesCamelCase, matchesSubString);\nconst fuzzyRegExpCache = new LRUCache<string, RegExp>(10000); // bounded to 10000 elements\n\n/**\n * Match pattern against word in a fuzzy way. This will only return a single match.\n * @internal\n */\nexport function matchesFuzzy(word: string, wordToMatchAgainst: string, enableSeparateSubstringMatching = false): IMatch[] | null {\n // istanbul ignore next\n if (typeof word !== \"string\" || typeof wordToMatchAgainst !== \"string\") {\n return null; // return early for invalid input\n }\n\n // Form RegExp for wildcard matches\n let regexp = fuzzyRegExpCache.get(word);\n if (!regexp) {\n regexp = new RegExp(strings.convertSimple2RegExpPattern(word), \"i\");\n fuzzyRegExpCache.set(word, regexp);\n }\n\n // RegExp Filter\n const match = regexp.exec(wordToMatchAgainst);\n if (match) {\n return [{ start: match.index, end: match.index + match[0].length }];\n }\n\n // Default Filter\n return enableSeparateSubstringMatching ? /* istanbul ignore next */ fuzzySeparateFilter(word, wordToMatchAgainst) : fuzzyContiguousFilter(word, wordToMatchAgainst);\n}\n\n/**\n * Match pattern against word in a fuzzy way. As in IntelliSense and faster and more\n * powerful than `matchesFuzzy`. This will only return a single match.\n * @internal\n */\nexport function matchesFuzzy2(pattern: string, word: string): IMatch[] | null {\n const score = fuzzyScore(pattern, pattern.toLowerCase(), 0, word, word.toLowerCase(), 0, true);\n return score ? createMatches(score) : null;\n}\n\n// #region --- fuzzyScore ---\n/**\n * @internal\n */\nexport function createMatches(score: undefined | FuzzyScore): IMatch[] {\n // istanbul ignore next\n if (typeof score === \"undefined\") {\n return [];\n }\n\n const matches = score[1].toString(2);\n const wordStart = score[2];\n const res: IMatch[] = [];\n\n for (let pos = wordStart; pos < _maxLen; pos++) {\n if (matches[matches.length - (pos + 1)] === \"1\") {\n const last = res[res.length - 1];\n if (last && last.end === pos) {\n last.end = pos + 1;\n } else {\n res.push({ start: pos, end: pos + 1 });\n }\n }\n }\n return res;\n}\n\nconst _maxLen = 128;\n\nfunction initTable() {\n const table: number[][] = [];\n const row: number[] = [0];\n for (let i = 1; i <= _maxLen; i++) {\n row.push(-i);\n }\n for (let i = 0; i <= _maxLen; i++) {\n const thisRow = row.slice(0);\n thisRow[0] = -i;\n table.push(thisRow);\n }\n return table;\n}\n\nconst _table = initTable();\nconst _scores = initTable();\n// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\nconst _arrows = <Arrow[][]>initTable();\nconst _debug = false;\n\nfunction isSeparatorAtPos(value: string, index: number): boolean {\n if (index < 0 || index >= value.length) {\n return false;\n }\n const code = value.charCodeAt(index);\n switch (code) {\n case CharCode.Underline:\n case CharCode.Dash:\n case CharCode.Period:\n case CharCode.Space:\n case CharCode.Slash:\n case CharCode.Backslash:\n case CharCode.SingleQuote:\n case CharCode.DoubleQuote:\n case CharCode.Colon:\n case CharCode.DollarSign:\n return true;\n default:\n return false;\n }\n}\n\nfunction isWhitespaceAtPos(value: string, index: number): boolean {\n if (index < 0 || index >= value.length) {\n return false;\n }\n const code = value.charCodeAt(index);\n switch (code) {\n // istanbul ignore next\n case CharCode.Space:\n case CharCode.Tab:\n return true;\n default:\n return false;\n }\n}\n\nfunction isUpperCaseAtPos(pos: number, word: string, wordLow: string): boolean {\n return word[pos] !== wordLow[pos];\n}\n\n/** @internal */\nexport function isPatternInWord(patternLow: string, patternPos: number, patternLen: number, wordLow: string, wordPos: number, wordLen: number): boolean {\n while (patternPos < patternLen && wordPos < wordLen) {\n if (patternLow[patternPos] === wordLow[wordPos]) {\n patternPos += 1;\n }\n wordPos += 1;\n }\n return patternPos === patternLen; // pattern must be exhausted\n}\n\nconst enum Arrow { Top = 0b1, Diag = 0b10, Left = 0b100 }\n\n/**\n * A tuple of three values.\n * 0. the score\n * 1. the matches encoded as bitmask (2^53)\n * 2. the offset at which matching started\n * @internal\n */\nexport type FuzzyScore = [number, number, number];\n\n/** @internal */\nexport namespace FuzzyScore { // eslint-disable-line @typescript-eslint/no-redeclare\n /**\n * No matches and value `-100`\n * @internal\n */\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n export const Default: [-100, 0, 0] = <[-100, 0, 0]>Object.freeze([-100, 0, 0]);\n\n // istanbul ignore next\n /** @internal */\n export function isDefault(score?: FuzzyScore): score is [-100, 0, 0] {\n return !score || (score[0] === -100 && score[1] === 0 && score[2] === 0);\n }\n}\n\n/** @internal */\nexport type FuzzyScorer = (pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, firstMatchCanBeWeak: boolean) => FuzzyScore | undefined;\n\n/** @internal */\nexport function fuzzyScore(pattern: string, patternLow: string, patternStart: number, word: string, wordLow: string, wordStart: number, firstMatchCanBeWeak: boolean): FuzzyScore | undefined {\n // istanbul ignore next\n const patternLen = pattern.length > _maxLen ? _maxLen : pattern.length;\n const wordLen = word.length > _maxLen ? _maxLen : word.length;\n\n if (patternStart >= patternLen || wordStart >= wordLen || (patternLen - patternStart) > (wordLen - wordStart)) {\n return undefined;\n }\n\n // Run a simple check if the characters of pattern occur\n // (in order) at all in word. If that isn't the case we\n // stop because no match will be possible\n if (!isPatternInWord(patternLow, patternStart, patternLen, wordLow, wordStart, wordLen)) {\n return undefined;\n }\n\n let row: number = 1;\n let column: number = 1;\n let patternPos = patternStart;\n let wordPos = wordStart;\n\n let hasStrongFirstMatch = false;\n\n // There will be a match, fill in tables\n for (row = 1, patternPos = patternStart; patternPos < patternLen; row++, patternPos++) {\n\n for (column = 1, wordPos = wordStart; wordPos < wordLen; column++, wordPos++) {\n\n const score = _doScore(pattern, patternLow, patternPos, patternStart, word, wordLow, wordPos);\n\n if (patternPos === patternStart && score > 1) {\n hasStrongFirstMatch = true;\n }\n\n _scores[row][column] = score;\n\n const diag = _table[row - 1][column - 1] + (score > 1 ? 1 : score);\n const top = _table[row - 1][column] + -1;\n const left = _table[row][column - 1] + -1;\n\n if (left >= top) {\n // left or diag\n if (left > diag) {\n _table[row][column] = left;\n _arrows[row][column] = Arrow.Left;\n } else if (left === diag) {\n _table[row][column] = left;\n _arrows[row][column] = Arrow.Left | Arrow.Diag;\n } else {\n _table[row][column] = diag;\n _arrows[row][column] = Arrow.Diag;\n }\n } else {\n // top or diag\n if (top > diag) {\n _table[row][column] = top;\n _arrows[row][column] = Arrow.Top;\n } else if (top === diag) {\n _table[row][column] = top;\n _arrows[row][column] = Arrow.Top | Arrow.Diag;\n } else {\n _table[row][column] = diag;\n _arrows[row][column] = Arrow.Diag;\n }\n }\n }\n }\n\n if (!hasStrongFirstMatch && !firstMatchCanBeWeak) {\n return undefined;\n }\n\n _matchesCount = 0;\n _topScore = -100;\n _wordStart = wordStart;\n _firstMatchCanBeWeak = firstMatchCanBeWeak;\n\n _findAllMatches2(row - 1, column - 1, patternLen === wordLen ? 1 : 0, 0, false);\n if (_matchesCount === 0) {\n return undefined;\n }\n\n return [_topScore, _topMatch2, wordStart];\n}\n\nfunction _doScore(pattern: string, patternLow: string, patternPos: number, patternStart: number, word: string, wordLow: string, wordPos: number) {\n if (patternLow[patternPos] !== wordLow[wordPos]) {\n return -1;\n }\n if (wordPos === (patternPos - patternStart)) {\n // common prefix: `foobar <-> foobaz`\n // ^^^^^\n if (pattern[patternPos] === word[wordPos]) {\n return 7;\n } else {\n return 5;\n }\n } else if (isUpperCaseAtPos(wordPos, word, wordLow) && (wordPos === 0 || !isUpperCaseAtPos(wordPos - 1, word, wordLow))) {\n // hitting upper-case: `foo <-> forOthers`\n // ^^ ^\n if (pattern[patternPos] === word[wordPos]) {\n return 7;\n } else {\n return 5;\n }\n } else if (isSeparatorAtPos(wordLow, wordPos) && (wordPos === 0 || !isSeparatorAtPos(wordLow, wordPos - 1))) {\n // hitting a separator: `. <-> foo.bar`\n // ^\n return 5;\n\n } else if (isSeparatorAtPos(wordLow, wordPos - 1) || isWhitespaceAtPos(wordLow, wordPos - 1)) {\n // post separator: `foo <-> bar_foo`\n // ^^^\n return 5;\n\n } else {\n return 1;\n }\n}\n\nlet _matchesCount: number = 0;\nlet _topMatch2: number = 0;\nlet _topScore: number = 0;\nlet _wordStart: number = 0;\nlet _firstMatchCanBeWeak: boolean = false;\n\nfunction _findAllMatches2(row: number, column: number, total: number, matches: number, lastMatched: boolean): void {\n\n if (_matchesCount >= 10 || total < -25) {\n // stop when having already 10 results, or\n // when a potential alignment as already 5 gaps\n return;\n }\n\n let simpleMatchCount = 0;\n\n while (row > 0 && column > 0) {\n\n const score = _scores[row][column];\n const arrow = _arrows[row][column];\n\n if (arrow === Arrow.Left) {\n // left -> no match, skip a word character\n column -= 1;\n if (lastMatched) {\n total -= 5; // new gap penalty\n } else if (matches !== 0) {\n total -= 1; // gap penalty after first match\n }\n lastMatched = false;\n simpleMatchCount = 0;\n } else {\n /* istanbul ignore else */\n if (arrow & Arrow.Diag) {\n if (arrow & Arrow.Left) {\n // left\n _findAllMatches2(\n row,\n column - 1,\n matches !== 0 ? total - 1 : total, // gap penalty after first match\n matches,\n lastMatched\n );\n }\n\n // diag\n total += score;\n row -= 1;\n column -= 1;\n lastMatched = true;\n\n // match -> set a 1 at the word pos\n matches += 2 ** (column + _wordStart);\n\n // count simple matches and boost a row of\n // simple matches when they yield in a\n // strong match.\n if (score === 1) {\n simpleMatchCount += 1;\n\n if (row === 0 && !_firstMatchCanBeWeak) {\n // when the first match is a weak\n // match we discard it\n return undefined;\n }\n\n } else {\n // boost\n total += 1 + (simpleMatchCount * (score - 1));\n simpleMatchCount = 0;\n }\n\n } else {\n // istanbul ignore next\n return undefined;\n }\n }\n }\n\n total -= column >= 3 ? 9 : column * 3; // late start penalty\n\n // dynamically keep track of the current top score\n // and insert the current best score at head, the rest at tail\n _matchesCount += 1;\n if (total > _topScore) {\n _topScore = total;\n _topMatch2 = matches;\n }\n}\n\n// #endregion\n\n// #region --- graceful ---\n/** @internal */\nexport function fuzzyScoreGracefulAggressive(pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, firstMatchCanBeWeak: boolean): FuzzyScore | undefined {\n return fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, true, firstMatchCanBeWeak);\n}\n\n/** @internal */\nexport function fuzzyScoreGraceful(pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, firstMatchCanBeWeak: boolean): FuzzyScore | undefined {\n return fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, false, firstMatchCanBeWeak);\n}\n\nfunction fuzzyScoreWithPermutations(pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, aggressive: boolean, firstMatchCanBeWeak: boolean): FuzzyScore | undefined {\n let top = fuzzyScore(pattern, lowPattern, patternPos, word, lowWord, wordPos, firstMatchCanBeWeak);\n\n if (top && !aggressive) {\n // when using the original pattern yield a result we`\n // return it unless we are aggressive and try to find\n // a better alignment, e.g. `cno` -> `^co^ns^ole` or `^c^o^nsole`.\n return top;\n }\n\n // istanbul ignore else\n if (pattern.length >= 3) {\n // When the pattern is long enough then try a few (max 7)\n // permutations of the pattern to find a better match. The\n // permutations only swap neighbouring characters, e.g\n // `cnoso` becomes `conso`, `cnsoo`, `cnoos`.\n const tries = Math.min(7, pattern.length - 1);\n for (let movingPatternPos = patternPos + 1; movingPatternPos < tries; movingPatternPos++) {\n const newPattern = nextTypoPermutation(pattern, movingPatternPos);\n // istanbul ignore else\n if (newPattern) {\n const candidate = fuzzyScore(newPattern, newPattern.toLowerCase(), patternPos, word, lowWord, wordPos, firstMatchCanBeWeak);\n if (candidate) {\n candidate[0] -= 3; // permutation penalty\n // istanbul ignore else\n if (!top || candidate[0] > top[0]) {\n top = candidate;\n }\n }\n }\n }\n }\n\n return top;\n}\n\nfunction nextTypoPermutation(pattern: string, patternPos: number): string | undefined {\n\n // istanbul ignore next\n if (patternPos + 1 >= pattern.length) {\n return undefined;\n }\n\n const swap1 = pattern[patternPos];\n const swap2 = pattern[patternPos + 1];\n\n // istanbul ignore next\n if (swap1 === swap2) {\n return undefined;\n }\n\n return pattern.slice(0, patternPos)\n + swap2\n + swap1\n + pattern.slice(patternPos + 2);\n}\n\n// #endregion\n"]}
@@ -30,44 +30,42 @@ export class LinkedMap {
30
30
  return this._size;
31
31
  }
32
32
  get first() {
33
- var _b;
34
- return (_b = this._head) === null || _b === void 0 ? void 0 : _b.value;
33
+ return this._head?.value;
35
34
  }
36
35
  get last() {
37
- var _b;
38
- return (_b = this._tail) === null || _b === void 0 ? void 0 : _b.value;
36
+ return this._tail?.value;
39
37
  }
40
38
  has(key) {
41
39
  return this._map.has(key);
42
40
  }
43
- get(key, touch = 0 /* None */) {
41
+ get(key, touch = 0 /* Touch.None */) {
44
42
  const item = this._map.get(key);
45
43
  if (!item) {
46
44
  return undefined;
47
45
  }
48
- if (touch !== 0 /* None */) {
46
+ if (touch !== 0 /* Touch.None */) {
49
47
  this.touch(item, touch);
50
48
  }
51
49
  return item.value;
52
50
  }
53
- set(key, value, touch = 0 /* None */) {
51
+ set(key, value, touch = 0 /* Touch.None */) {
54
52
  let item = this._map.get(key);
55
53
  if (item) {
56
54
  item.value = value;
57
- if (touch !== 0 /* None */) {
55
+ if (touch !== 0 /* Touch.None */) {
58
56
  this.touch(item, touch);
59
57
  }
60
58
  }
61
59
  else {
62
60
  item = { key, value, next: undefined, previous: undefined };
63
61
  switch (touch) {
64
- case 0 /* None */:
62
+ case 0 /* Touch.None */:
65
63
  this.addItemLast(item);
66
64
  break;
67
- case 1 /* AsOld */:
65
+ case 1 /* Touch.AsOld */:
68
66
  this.addItemFirst(item);
69
67
  break;
70
- case 2 /* AsNew */:
68
+ case 2 /* Touch.AsNew */:
71
69
  this.addItemLast(item);
72
70
  break;
73
71
  default:
@@ -289,10 +287,10 @@ export class LinkedMap {
289
287
  if (!this._head || !this._tail) {
290
288
  throw new Error("Invalid list");
291
289
  }
292
- if ((touch !== 1 /* AsOld */ && touch !== 2 /* AsNew */)) {
290
+ if ((touch !== 1 /* Touch.AsOld */ && touch !== 2 /* Touch.AsNew */)) {
293
291
  return;
294
292
  }
295
- if (touch === 1 /* AsOld */) {
293
+ if (touch === 1 /* Touch.AsOld */) {
296
294
  if (item === this._head) {
297
295
  return;
298
296
  }
@@ -317,7 +315,7 @@ export class LinkedMap {
317
315
  this._head = item;
318
316
  this._state++;
319
317
  }
320
- else if (touch === 2 /* AsNew */) {
318
+ else if (touch === 2 /* Touch.AsNew */) {
321
319
  if (item === this._tail) {
322
320
  return;
323
321
  }
@@ -380,14 +378,14 @@ export class LRUCache extends LinkedMap {
380
378
  this._ratio = Math.min(Math.max(0, ratio), 1);
381
379
  this.checkTrim();
382
380
  }
383
- get(key, touch = 2 /* AsNew */) {
381
+ get(key, touch = 2 /* Touch.AsNew */) {
384
382
  return super.get(key, touch);
385
383
  }
386
384
  peek(key) {
387
- return super.get(key, 0 /* None */);
385
+ return super.get(key, 0 /* Touch.None */);
388
386
  }
389
387
  set(key, value) {
390
- super.set(key, value, 2 /* AsNew */);
388
+ super.set(key, value, 2 /* Touch.AsNew */);
391
389
  this.checkTrim();
392
390
  return this;
393
391
  }