streamlit-nightly 1.38.1.dev20240909__py2.py3-none-any.whl → 1.38.1.dev20240911__py2.py3-none-any.whl

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 (94) hide show
  1. streamlit/__init__.py +1 -1
  2. streamlit/cli_util.py +59 -0
  3. streamlit/commands/experimental_query_params.py +33 -10
  4. streamlit/commands/page_config.py +6 -3
  5. streamlit/components/v1/custom_component.py +3 -5
  6. streamlit/config_option.py +3 -3
  7. streamlit/delta_generator.py +1 -1
  8. streamlit/elements/arrow.py +1 -1
  9. streamlit/elements/form.py +1 -1
  10. streamlit/elements/lib/built_in_chart_utils.py +1 -2
  11. streamlit/{color_util.py → elements/lib/color_util.py} +8 -20
  12. streamlit/elements/lib/options_selector_utils.py +191 -4
  13. streamlit/elements/lib/policies.py +1 -6
  14. streamlit/elements/lib/utils.py +11 -168
  15. streamlit/elements/map.py +6 -1
  16. streamlit/elements/plotly_chart.py +1 -1
  17. streamlit/elements/vega_charts.py +2 -2
  18. streamlit/elements/widgets/button.py +7 -5
  19. streamlit/elements/widgets/button_group.py +8 -8
  20. streamlit/elements/widgets/camera_input.py +1 -1
  21. streamlit/elements/widgets/chat.py +7 -5
  22. streamlit/elements/widgets/checkbox.py +1 -1
  23. streamlit/elements/widgets/color_picker.py +1 -1
  24. streamlit/elements/widgets/data_editor.py +1 -1
  25. streamlit/elements/widgets/file_uploader.py +1 -1
  26. streamlit/elements/widgets/multiselect.py +3 -5
  27. streamlit/elements/widgets/number_input.py +2 -2
  28. streamlit/elements/widgets/radio.py +3 -6
  29. streamlit/elements/widgets/select_slider.py +7 -5
  30. streamlit/elements/widgets/selectbox.py +3 -6
  31. streamlit/elements/widgets/slider.py +2 -2
  32. streamlit/elements/widgets/text_widgets.py +1 -1
  33. streamlit/elements/widgets/time_widgets.py +1 -1
  34. streamlit/errors.py +22 -0
  35. streamlit/file_util.py +4 -4
  36. streamlit/net_util.py +4 -2
  37. streamlit/runtime/app_session.py +1 -1
  38. streamlit/runtime/caching/cache_utils.py +5 -1
  39. streamlit/runtime/caching/storage/local_disk_cache_storage.py +2 -2
  40. streamlit/runtime/state/__init__.py +1 -5
  41. streamlit/runtime/state/common.py +1 -14
  42. streamlit/runtime/state/query_params.py +9 -2
  43. streamlit/runtime/state/widgets.py +0 -9
  44. streamlit/static/asset-manifest.json +20 -20
  45. streamlit/static/index.html +1 -1
  46. streamlit/static/static/js/1260.4017a70f.chunk.js +5 -0
  47. streamlit/static/static/js/2266.f3886a78.chunk.js +2 -0
  48. streamlit/static/static/js/{245.532167ed.chunk.js → 245.68a062da.chunk.js} +1 -1
  49. streamlit/static/static/js/{3156.0542d233.chunk.js → 3156.002c6ee0.chunk.js} +1 -1
  50. streamlit/static/static/js/3560.ce031236.chunk.js +1 -0
  51. streamlit/static/static/js/{4103.2a961369.chunk.js → 4103.d863052a.chunk.js} +1 -1
  52. streamlit/static/static/js/{5180.5e064ef1.chunk.js → 5180.e826dd46.chunk.js} +1 -1
  53. streamlit/static/static/js/5618.08be9e66.chunk.js +5 -0
  54. streamlit/static/static/js/{5625.0394ecdc.chunk.js → 5625.3a8dc81f.chunk.js} +1 -1
  55. streamlit/static/static/js/{5711.28939a95.chunk.js → 5711.3d376a33.chunk.js} +1 -1
  56. streamlit/static/static/js/6088.c137d543.chunk.js +1 -0
  57. streamlit/static/static/js/{6360.17e58a87.chunk.js → 6360.6d7cfa35.chunk.js} +1 -1
  58. streamlit/static/static/js/{7193.bc9bdd04.chunk.js → 7193.2594a18c.chunk.js} +1 -1
  59. streamlit/static/static/js/8166.11abccb8.chunk.js +1 -0
  60. streamlit/static/static/js/{8237.ed5d881b.chunk.js → 8237.210a5ac4.chunk.js} +1 -1
  61. streamlit/static/static/js/8815.0284d089.chunk.js +1 -0
  62. streamlit/static/static/js/9114.1ee3d4dd.chunk.js +1 -0
  63. streamlit/static/static/js/954.3cc76210.chunk.js +5 -0
  64. streamlit/static/static/js/{main.5d1dd93c.js → main.e270cec5.js} +2 -2
  65. streamlit/string_util.py +13 -5
  66. streamlit/time_util.py +3 -14
  67. streamlit/util.py +1 -127
  68. streamlit/watcher/local_sources_watcher.py +1 -1
  69. streamlit/web/bootstrap.py +2 -2
  70. streamlit/web/cli.py +2 -2
  71. {streamlit_nightly-1.38.1.dev20240909.dist-info → streamlit_nightly-1.38.1.dev20240911.dist-info}/METADATA +1 -1
  72. {streamlit_nightly-1.38.1.dev20240909.dist-info → streamlit_nightly-1.38.1.dev20240911.dist-info}/RECORD +82 -85
  73. streamlit/case_converters.py +0 -91
  74. streamlit/code_util.py +0 -90
  75. streamlit/constants.py +0 -19
  76. streamlit/static/static/js/1260.5ebd5704.chunk.js +0 -5
  77. streamlit/static/static/js/2266.48d2ebd0.chunk.js +0 -2
  78. streamlit/static/static/js/3560.17463b1c.chunk.js +0 -1
  79. streamlit/static/static/js/5618.6d42e995.chunk.js +0 -5
  80. streamlit/static/static/js/6088.00849717.chunk.js +0 -1
  81. streamlit/static/static/js/8166.0d1971ea.chunk.js +0 -1
  82. streamlit/static/static/js/8815.0b7dc879.chunk.js +0 -1
  83. streamlit/static/static/js/9114.c676bef4.chunk.js +0 -1
  84. streamlit/static/static/js/954.bf90fe19.chunk.js +0 -5
  85. /streamlit/{echo.py → commands/echo.py} +0 -0
  86. /streamlit/elements/{form_utils.py → lib/form_utils.py} +0 -0
  87. /streamlit/{js_number.py → elements/lib/js_number.py} +0 -0
  88. /streamlit/static/static/js/{2266.48d2ebd0.chunk.js.LICENSE.txt → 2266.f3886a78.chunk.js.LICENSE.txt} +0 -0
  89. /streamlit/static/static/js/{main.5d1dd93c.js.LICENSE.txt → main.e270cec5.js.LICENSE.txt} +0 -0
  90. /streamlit/{folder_black_list.py → watcher/folder_black_list.py} +0 -0
  91. {streamlit_nightly-1.38.1.dev20240909.data → streamlit_nightly-1.38.1.dev20240911.data}/scripts/streamlit.cmd +0 -0
  92. {streamlit_nightly-1.38.1.dev20240909.dist-info → streamlit_nightly-1.38.1.dev20240911.dist-info}/WHEEL +0 -0
  93. {streamlit_nightly-1.38.1.dev20240909.dist-info → streamlit_nightly-1.38.1.dev20240911.dist-info}/entry_points.txt +0 -0
  94. {streamlit_nightly-1.38.1.dev20240909.dist-info → streamlit_nightly-1.38.1.dev20240911.dist-info}/top_level.txt +0 -0
@@ -1,91 +0,0 @@
1
- # Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2024)
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- from __future__ import annotations
16
-
17
- import re
18
- from typing import Any, Callable
19
-
20
-
21
- def to_upper_camel_case(snake_case_str: str) -> str:
22
- """Converts snake_case to UpperCamelCase.
23
-
24
- Example
25
- -------
26
- foo_bar -> FooBar
27
-
28
- """
29
- return "".join(map(str.title, snake_case_str.split("_")))
30
-
31
-
32
- def to_lower_camel_case(snake_case_str: str) -> str:
33
- """Converts snake_case to lowerCamelCase.
34
-
35
- Example
36
- -------
37
- foo_bar -> fooBar
38
- fooBar -> foobar
39
-
40
- """
41
- words = snake_case_str.split("_")
42
- if len(words) > 1:
43
- capitalized = [w.title() for w in words]
44
- capitalized[0] = words[0]
45
- return "".join(capitalized)
46
- else:
47
- return snake_case_str
48
-
49
-
50
- def to_snake_case(camel_case_str: str) -> str:
51
- """Converts UpperCamelCase and lowerCamelCase to snake_case.
52
-
53
- Examples
54
- --------
55
- fooBar -> foo_bar
56
- BazBang -> baz_bang
57
-
58
- """
59
- s1 = re.sub("(.)([A-Z][a-z]+)", r"\1_\2", camel_case_str)
60
- return re.sub("([a-z0-9])([A-Z])", r"\1_\2", s1).lower()
61
-
62
-
63
- def convert_dict_keys(
64
- func: Callable[[str], str], in_dict: dict[Any, Any]
65
- ) -> dict[Any, Any]:
66
- """Apply a conversion function to all keys in a dict.
67
-
68
- Parameters
69
- ----------
70
- func : callable
71
- The function to apply. Takes a str and returns a str.
72
- in_dict : dict
73
- The dictionary to convert. If some value in this dict is itself a dict,
74
- it also gets recursively converted.
75
-
76
- Returns
77
- -------
78
- dict
79
- A new dict with all the contents of `in_dict`, but with the keys
80
- converted by `func`.
81
-
82
- """
83
- out_dict = {}
84
- for k, v in in_dict.items():
85
- converted_key = func(k)
86
-
87
- if isinstance(v, dict):
88
- out_dict[converted_key] = convert_dict_keys(func, v)
89
- else:
90
- out_dict[converted_key] = v
91
- return out_dict
streamlit/code_util.py DELETED
@@ -1,90 +0,0 @@
1
- # Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2024)
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- """A bunch of useful code utilities."""
16
-
17
- from __future__ import annotations
18
-
19
- import re
20
- from typing import Any
21
-
22
-
23
- def extract_args(line: str) -> list[str]:
24
- """Parse argument strings from all outer parentheses in a line of code.
25
-
26
- Parameters
27
- ----------
28
- line : str
29
- A line of code
30
-
31
- Returns
32
- -------
33
- list of strings
34
- Contents of the outer parentheses
35
-
36
- Example
37
- -------
38
- >>> line = 'foo(bar, baz), "a", my(func)'
39
- >>> extract_args(line)
40
- ['bar, baz', 'func']
41
-
42
- """
43
- stack = 0
44
- startIndex = None
45
- results = []
46
-
47
- for i, c in enumerate(line):
48
- if c == "(":
49
- if stack == 0:
50
- startIndex = i + 1
51
- stack += 1
52
- elif c == ")":
53
- stack -= 1
54
- if stack == 0:
55
- results.append(line[startIndex:i])
56
- return results
57
-
58
-
59
- def get_method_args_from_code(args: list[Any], line: str) -> list[str]:
60
- """Parse arguments from a stringified arguments list inside parentheses
61
-
62
- Parameters
63
- ----------
64
- args : list
65
- A list where it's size matches the expected number of parsed arguments
66
- line : str
67
- Stringified line of code with method arguments inside parentheses
68
-
69
- Returns
70
- -------
71
- list of strings
72
- Parsed arguments
73
-
74
- Example
75
- -------
76
- >>> line = "foo(bar, baz, my(func, tion))"
77
- >>>
78
- >>> get_method_args_from_code(range(0, 3), line)
79
- ['bar', 'baz', 'my(func, tion)']
80
-
81
- """
82
- line_args = extract_args(line)[0]
83
-
84
- # Split arguments, https://stackoverflow.com/a/26634150
85
- if len(args) > 1:
86
- inputs = re.split(r",\s*(?![^(){}[\]]*\))", line_args)
87
- assert len(inputs) == len(args), "Could not split arguments"
88
- else:
89
- inputs = [line_args]
90
- return inputs
streamlit/constants.py DELETED
@@ -1,19 +0,0 @@
1
- # Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2024)
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- from __future__ import annotations
16
-
17
- EMBED_QUERY_PARAM = "embed"
18
- EMBED_OPTIONS_QUERY_PARAM = "embed_options"
19
- EMBED_QUERY_PARAMS_KEYS = [EMBED_QUERY_PARAM, EMBED_OPTIONS_QUERY_PARAM]
@@ -1,5 +0,0 @@
1
- (self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[1260],{68035:(t,e,r)=>{"use strict";r.d(e,{A:()=>u});r(58878);var n=r(25571),o=r(78286),i=r(89653);const s=r(60667).i7`
2
- 50% {
3
- color: rgba(0, 0, 0, 0);
4
- }
5
- `,a=(0,i.A)("span",{target:"edlqvik0"})((t=>{let{includeDot:e,shouldBlink:r,theme:n}=t;return{...e?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:n.colors.gray,margin:"0 5px"}}:{},...r?{color:n.colors.red,animationName:`${s}`,animationDuration:"0.5s",animationIterationCount:5}:{}}}),"");var l=r(90782);const u=t=>{let{dirty:e,value:r,maxLength:i,className:s,type:u="single",inForm:c}=t;const d=[],p=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];d.push((0,l.jsx)(a,{includeDot:d.length>0,shouldBlink:e,children:t},d.length))};if(e){const t=c?"submit form":"apply";if("multiline"===u){p(`Press ${(0,n.u_)()?"\u2318":"Ctrl"}+Enter to ${t}`)}else"single"===u&&p(`Press Enter to ${t}`)}return i&&("chat"!==u||e)&&p(`${r.length}/${i}`,e&&r.length>=i),(0,l.jsx)(o.tp,{"data-testid":"InputInstructions",className:s,children:d})}},34752:(t,e,r)=>{"use strict";r.d(e,{o:()=>o});var n=r(25571);class o{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(t,e,r){(0,n.se)(this.formClearListener)&&this.lastWidgetMgr===t&&this.lastFormId===e||(this.disconnect(),(0,n._L)(e)&&(this.formClearListener=t.addFormClearedListener(e,r),this.lastWidgetMgr=t,this.lastFormId=e))}disconnect(){var t;null===(t=this.formClearListener)||void 0===t||t.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}},81260:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>v});var n=r(58878),o=r(32698),i=r.n(o),s=r(59095),a=r(8151),l=r(29669),u=r(34752),c=r(68035),d=r(70474),p=r(78286),h=r(93480),f=r(997),m=r(25571);const y=(0,r(89653).A)("div",{target:"e11y4ecf0"})((t=>{let{width:e}=t;return{position:"relative",width:e}}),"");var b=r(90782);class g extends n.PureComponent{constructor(t){var e;super(t),e=this,this.formClearHelper=new u.o,this.id=void 0,this.state={dirty:!1,value:this.initialValue},this.commitWidgetValue=function(t){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const{widgetMgr:n,element:o,fragmentId:i}=e.props;n.setStringValue(o,e.state.value,t,i),r&&e.setState({dirty:!1})},this.onFormCleared=()=>{this.setState(((t,e)=>{var r;return{value:null!==(r=e.element.default)&&void 0!==r?r:null}}),(()=>this.commitWidgetValue({fromUi:!0})))},this.onBlur=()=>{this.state.dirty&&this.commitWidgetValue({fromUi:!0})},this.onChange=t=>{const{value:e}=t.target,{element:r}=this.props,{maxChars:n}=r;0!==n&&e.length>n||((0,m.Ml)(this.props.element)?this.setState({dirty:!0,value:e},(()=>{this.commitWidgetValue({fromUi:!0},!1)})):this.setState({dirty:!0,value:e}))},this.onKeyPress=t=>{"Enter"===t.key&&(this.state.dirty&&this.commitWidgetValue({fromUi:!0}),(0,m.Ml)(this.props.element)&&this.props.widgetMgr.submitForm(this.props.element.formId,this.props.fragmentId))},this.id=i()("text_input_")}get initialValue(){var t;const e=this.props.widgetMgr.getStringValue(this.props.element);return null!==(t=null!==e&&void 0!==e?e:this.props.element.default)&&void 0!==t?t:null}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:t}=this.props.element;t&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:t}=this.props.element;this.props.element.setValue=!1,this.setState({value:null!==t&&void 0!==t?t:null},(()=>{this.commitWidgetValue({fromUi:!1})}))}getTypeString(){return this.props.element.type===l.ks.Type.PASSWORD?"password":"text"}render(){var t;const{dirty:e,value:r}=this.state,{element:n,width:o,disabled:i,widgetMgr:a,theme:l}=this.props,{placeholder:u}=n;return this.formClearHelper.manageFormClearListener(a,n.formId,this.onFormCleared),(0,b.jsxs)(y,{className:"stTextInput","data-testid":"stTextInput",width:o,children:[(0,b.jsx)(d.L,{label:n.label,disabled:i,labelVisibility:(0,m.yv)(null===(t=n.labelVisibility)||void 0===t?void 0:t.value),htmlFor:this.id,children:n.help&&(0,b.jsx)(p.j,{children:(0,b.jsx)(h.A,{content:n.help,placement:f.W.TOP_RIGHT})})}),(0,b.jsx)(s.A,{value:null!==r&&void 0!==r?r:"",placeholder:u,onBlur:this.onBlur,onChange:this.onChange,onKeyPress:this.onKeyPress,"aria-label":n.label,disabled:i,id:this.id,type:this.getTypeString(),autoComplete:n.autocomplete,overrides:{Input:{style:{minWidth:0,"::placeholder":{opacity:"0.7"},lineHeight:l.lineHeights.inputWidget,paddingRight:l.spacing.sm,paddingLeft:l.spacing.sm,paddingBottom:l.spacing.sm,paddingTop:l.spacing.sm}},Root:{props:{"data-testid":"stTextInputRootElement"},style:{height:l.sizes.minElementHeight,borderLeftWidth:l.sizes.borderWidth,borderRightWidth:l.sizes.borderWidth,borderTopWidth:l.sizes.borderWidth,borderBottomWidth:l.sizes.borderWidth}}}}),o>l.breakpoints.hideWidgetDetails&&(0,b.jsx)(c.A,{dirty:e,value:null!==r&&void 0!==r?r:"",maxLength:n.maxChars,inForm:(0,m.Ml)({formId:n.formId})})]})}}const v=(0,a.b)(g)},59095:(t,e,r)=>{"use strict";r.d(e,{A:()=>C});var n=r(58878),o=r(35331),i=r(4842),s=r(18648),a=r(81301),l=r(92850);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}var c=["Root","StartEnhancer","EndEnhancer"],d=["startEnhancer","endEnhancer","overrides"];function p(){return p=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},p.apply(this,arguments)}function h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);s=!0);}catch(l){a=!0,o=l}finally{try{s||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function m(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function y(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}function g(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=O(t);if(e){var o=O(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===u(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return v(t)}(this,r)}}function v(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function O(t){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},O(t)}function w(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var j=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}(O,t);var e,r,u,f=g(O);function O(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,O);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return w(v(t=f.call.apply(f,[this].concat(r))),"state",{isFocused:t.props.autoFocus||!1}),w(v(t),"onFocus",(function(e){t.setState({isFocused:!0}),t.props.onFocus(e)})),w(v(t),"onBlur",(function(e){t.setState({isFocused:!1}),t.props.onBlur(e)})),t}return e=O,(r=[{key:"render",value:function(){var t=this.props,e=t.startEnhancer,r=t.endEnhancer,u=t.overrides,f=u.Root,y=u.StartEnhancer,b=u.EndEnhancer,g=m(u,c),v=m(t,d),O=h((0,o._O)(f,a.bL),2),w=O[0],j=O[1],C=h((0,o._O)(y,a.P2),2),F=C[0],E=C[1],x=h((0,o._O)(b,a.P2),2),W=x[0],I=x[1],_=(0,i.e)(this.props,this.state);return n.createElement(w,p({"data-baseweb":"input"},_,j,{$adjoined:P(e,r),$hasIconTrailing:this.props.clearable||"password"==this.props.type}),S(e)&&n.createElement(F,p({},_,E,{$position:l.vN.start}),"function"===typeof e?e(_):e),n.createElement(s.A,p({},v,{overrides:g,adjoined:P(e,r),onFocus:this.onFocus,onBlur:this.onBlur})),S(r)&&n.createElement(W,p({},_,I,{$position:l.vN.end}),"function"===typeof r?r(_):r))}}])&&y(e.prototype,r),u&&y(e,u),Object.defineProperty(e,"prototype",{writable:!1}),O}(n.Component);function P(t,e){return S(t)&&S(e)?l.fb.both:S(t)?l.fb.left:S(e)?l.fb.right:l.fb.none}function S(t){return Boolean(t||0===t)}w(j,"defaultProps",{autoComplete:"on",autoFocus:!1,disabled:!1,name:"",onBlur:function(){},onFocus:function(){},overrides:{},required:!1,size:l.SK.default,startEnhancer:null,endEnhancer:null,clearable:!1,type:"text",readOnly:!1});const C=j},32698:(t,e,r)=>{var n=r(30136),o=0;t.exports=function(t){var e=++o;return n(t)+e}}}]);