!function(){"use strict";function t(e){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(e)}function e(e){var n=function(e){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(n)?n:n+""}function n(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,e(o.key),o)}}function r(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var o=new WeakSet,i=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),function(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}(this,o),document.dispatchEvent(new CustomEvent("payoneer:order-page-ready",{detail:this}))},(e=[{key:"orderStatusField",get:function(){var t=document.querySelector('select[name="order_status"]');if(!t)throw new Error("Could not locate the status dropdown field.");return t}},{key:"orderStatusDuplicate",get:function(){return document.querySelector('input[name="order_status"][data-origin="payoneer"]')}},{key:"lockStatus",value:function(){r(o,this,a).call(this,!1)}},{key:"unlockStatus",value:function(){r(o,this,a).call(this,!0)}}])&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function a(t){var e,n=this.orderStatusField;null===(e=this.orderStatusDuplicate)||void 0===e||e.remove(),t?n.disabled=!1:(n.disabled=!0,r(o,this,u).call(this,n.value))}function u(t){var e=document.createElement("input");e.type="hidden",e.name="order_status",e.value=t,e.setAttribute("data-origin","payoneer"),this.orderStatusField.parentNode.insertBefore(e,this.orderStatusField.nextSibling)}document.addEventListener("DOMContentLoaded",function(){return new i})}();