(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{288:function(e,t,r){"use strict";r.r(t);var n,o=r(0),a=r(278),l=r.n(a),i=(r(286),r(287),r(4)),c=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=function(){return(s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},u=function(e){function t(t){var r=e.call(this,t)||this;r.onChangeEmbed=function(e){var t=r.props.updateSrcEmbed,n=r.tryParse(e);r.setState((function(t){return{localSrcEmbed:{value:e,parsed:n||t.localSrcEmbed.parsed,hasErrors:!n,reset:!1}}}),(function(){n&&t(s(s({},r.state.localSrcEmbed),{reset:!1}))}))},r.onChangeTokenRequest=function(e){var t=r.props.updateSrcGenerateToken,n=r.tryParse(e);r.setState((function(t){return{localSrcGenerateToken:{value:e,parsed:n||t.localSrcGenerateToken.parsed,hasErrors:!n,reset:!1}}}),(function(){n&&t(s(s({},r.state.localSrcGenerateToken),{reset:!1}))}))},r.onChangeFilterConfig=function(e){var t=r.props.updateSrcFilterConfig,n=r.tryParse(e);r.setState((function(t){return{localFilterConfig:{value:e,parsed:n||t.localFilterConfig.parsed,hasErrors:!n,reset:!1}}}),(function(){n&&t(s(s({},r.state.localFilterConfig),{reset:!1}))}))},r.tryParse=function(e){try{return JSON.parse(e)}catch(e){}return null};var n=r.props,o=n.srcEmbed,a=n.srcFilterConfig,l=n.srcGenerateToken;return r.state={localSrcEmbed:o,localSrcGenerateToken:l,localFilterConfig:a},r}return c(t,e),t.prototype.componentDidUpdate=function(e,t){var r=this.props,n=r.srcEmbed,o=r.srcFilterConfig,a=r.srcGenerateToken;n.reset&&n!=e.srcEmbed&&this.setState({localSrcEmbed:n}),a.reset&&a!=e.srcGenerateToken&&this.setState({localSrcGenerateToken:a}),o.reset&&o!=e.srcFilterConfig&&this.setState({localFilterConfig:o})},t.prototype.render=function(){var e=this.state,t=e.localSrcGenerateToken,r=e.localFilterConfig,n=e.localSrcEmbed;return o.createElement(o.Fragment,null,o.createElement(i.z,null,o.createElement(i.v,null,"Token request"),o.createElement(i.v,null,o.createElement(l.a,{mode:"json",theme:"github",value:t.value,onChange:this.onChangeTokenRequest,name:"pintraPbiGenerateTokenEditor",editorProps:{$blockScrolling:!0},minLines:2,maxLines:8,style:{maxWidth:"400px",background:t.hasErrors?"#ef9a9a":"inherit"}}))),o.createElement(i.z,null,o.createElement(i.v,null,"Embed Configuration"),o.createElement(i.v,null,o.createElement(l.a,{mode:"json",theme:"github",value:n.value,onChange:this.onChangeEmbed,name:"pintraPbiEditor",editorProps:{$blockScrolling:!0},minLines:2,maxLines:8,style:{maxWidth:"400px",background:n.hasErrors?"#ef9a9a":"inherit"}}))),o.createElement(i.z,null,o.createElement(i.v,null,o.createElement(i.i,null)),o.createElement(i.v,null,o.createElement("div",{style:{maxWidth:"400px",display:"inline-block"},dangerouslySetInnerHTML:{__html:"Please refer to the <a href='https://tutorials.wpo365.com/courses/embed-power-bi-content-in-wordpress/' target='_blank'>online documentation</a>\n              for details on how to configure <a target='_blank' href='https://docs.microsoft.com/en-us/javascript/api/overview/powerbi/control-report-filters'>Report control filters</a>."}}))),!this.props.hideFilterConfig&&o.createElement(i.z,null,o.createElement(i.v,null,"Filter Configuration"),o.createElement(i.v,null,o.createElement(l.a,{mode:"json",theme:"github",value:r.value,onChange:this.onChangeFilterConfig,name:"pintraFilterConfigEditor",editorProps:{$blockScrolling:!0},minLines:10,maxLines:20,style:{maxWidth:"400px",background:r.hasErrors?"#ef9a9a":"inherit"}}))))},t}(o.Component);t.default=u}}]);