(this.webpackJsonpstreamlit_component_template=this.webpackJsonpstreamlit_component_template||[]).push([[0],{13:function(e,t,o){e.exports={poCheckboxLabel:"style_poCheckboxLabel__2IHB4",poCheckboxSpan:"style_poCheckboxSpan__ltXcy",poCheckbox:"style_poCheckbox__3Q56z"}},18:function(e,t,o){e.exports=o(26)},26:function(e,t,o){"use strict";o.r(t);var n=o(8),a=o.n(n),s=o(16),c=o.n(s),r=o(6),i=o(0),p=o(1),u=o(2),l=o(3),d=o(14),h=o(13),b=o.n(h),f=function(e){Object(u.a)(o,e);var t=Object(l.a)(o);function o(){var e;Object(i.a)(this,o);for(var n=arguments.length,s=new Array(n),c=0;c<n;c++)s[c]=arguments[c];return(e=t.call.apply(t,[this].concat(s))).state={action:"",data:"",uniqueId:"",options:{layer:"",units:""},isFocused:!1,isChecked:!1},e.render=function(){return a.a.createElement("label",{className:b.a.poCheckboxLabel},a.a.createElement("input",{className:b.a.poCheckbox,type:"checkbox",defaultChecked:e.props.args.isChecked,onChange:e.onChange,disabled:e.props.disabled,onFocus:e._onFocus,onBlur:e._onBlur}),a.a.createElement("span",{className:b.a.poCheckboxSpan},"Draw Geometry"))},e.setStateNow=function(t,o){e.setState((function(e){return Object(r.a)(Object(r.a)({},e),{},{action:t.action,data:t.data,uniqueId:t.uniqueId,options:t.options,isChecked:o})})),console.log("[POLLINATION-DEBUG]: JSON string sent.")},e.sendMessageTo=function(t){if("undefined"!=typeof window.parent.chrome){if("undefined"==typeof window.parent.chrome.webview)return console.log("[POLLINATION-DEBUG]: webview not found."),e.state;var o={action:t,data:e.props.args.data,uniqueId:e.props.args.uniqueId,options:e.props.args.options},n=JSON.stringify(o);return window.parent.chrome.webview.postMessage(n),o}return console.log("[POLLINATION-DEBUG]: chrome not found."),e.state},e.onChange=function(t){var o=t.target.checked,n=o?"DrawGeometry":"DisableDraw",a=e.sendMessageTo(n);e.setStateNow(a,o)},e._onFocus=function(){e.setState({isFocused:!0})},e._onBlur=function(){e.setState({isFocused:!1})},e}return Object(p.a)(o,[{key:"componentDidUpdate",value:function(){if(this.state.isChecked&&this.state.data!=this.props.args.data){var e=this.sendMessageTo("DisableDraw");e=this.sendMessageTo("DrawGeometry"),this.setStateNow(e,!0)}console.log("[POLLINATION-DEBUG]: auto-update.")}}]),o}(d.a),m=Object(d.b)(f);c.a.render(a.a.createElement(a.a.StrictMode,null,a.a.createElement(m,null)),document.getElementById("root"))}},[[18,1,2]]]);
//# sourceMappingURL=main.daad708a.chunk.js.map