(window.dakisSamJsonpFunction=window.dakisSamJsonpFunction||[]).push([[14],{541:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){var r=(0,i.getContext)(),n=r.wireUrl,o=r.lang,a="".concat(n,"/rua/projects/accept_invitation");return a+="?order_id=".concat(t,"&lang=").concat(o,"&authorization_code=").concat(e),(0,c.default)(a,"GET")};var n,c=(n=r(223))&&n.__esModule?n:{default:n},i=r(89)},670:function(t,e,r){"use strict";r.r(e);var n=r(2),o=r.n(n),a=r(87),c=r(147),i=r.n(c),u=r(253),s=r(336),p=r(247),l=r(252),f=r(261),d=r(309),y=r(91),b=r(5),m=r(212),h=r(58),g=r(15),O=r(133),v=r(117),j=r(541),S=r.n(j),w=r(89),E=r(4),P=r(3),_=r(9),C=r.n(_),k=r(41),R=r(1),I=r(45);function T(t){return(T="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})(t)}function D(e,t){var r,n=Object.keys(e);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(e),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)),n}function x(e){for(var t=1;tt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r]*>/g,"");try{(function t(e){var r=e.match(/<(script|noscript|meta)/)[1],n="");"meta"===r&&(n="/>");var o,a,c,i=m((a=n,[(o=e).substring(0,o.indexOf(a)+a.length),o.substring(o.indexOf(a)+a.length)]),2),u=i[0],s=i[1],p=[u];return 0]*)>")).exec(t);""!==i[1]&&(i[1].match(/\S*="[^"]*"/gm).forEach(function(t){var e=/(\S*)="([^"]*)"/.exec(t);c[e[1]]=e[2]}),i[1].split(" ").filter(function(t){return t.indexOf("=")<0}).forEach(function(t){""!==t&&(c[t]=!0)})),c.type="text/javascript",c.className="custom-header-script","meta"!==a&&(e=t.indexOf(">"),r=t.indexOf(""),e),n=t.substring(e+1,r),0<=t.indexOf("noscript")?(o=(new DOMParser).parseFromString(n,"text/html"),c.appendChild(o.body.children[0])):c.innerHTML=n),document.head.appendChild(c)})}catch(t){throw new SyntaxError("No script block provided")}}function v(t){return O(t.customCode),null}var j;e.default=(j=v,function(){!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}}),e&&f(t,e)}(n,o.a.Component);var r=d(n);function n(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(e=r.call(this,t)).state={isLoading:!0,customCode:""},e}return l(n,null,[{key:"sanitizeImports",value:function(t){if(!t)return"";for(var e,r=0,n="",o=t.indexOf("%");-1!==o;)0<=o-1&&(n+=t.substring(r,o)),(e=t.substr(o+1,2)).match(/[A-F\d]{2}/g)?n+=String.fromCharCode(parseInt(e.substr(0,2),16)):(n+="%",n+=e),r=o+3,o=t.indexOf("%",r);return n=(n=(n+=t.substring(r,t.length)).replace(/(\n)/g,"")).replace(/ {2,}/g,"")}}]),l(n,[{key:"componentDidMount",value:function(){var e=this;i()("".concat("https://garrus.mydakis.com","/websites/custom_header_codes"),"GET",{retailer_guid:a.a.get("retailer_guid")}).then(function(t){e.setState(function(){return{isLoading:!1,customCode:n.sanitizeImports(t)}})}).catch(function(){e.setState({isLoading:!1})})}},{key:"render",value:function(){var t=this.state,e=t.isLoading,r=t.customCode;return!e&&r&&0