(()=>{var e={};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),(()=>{var t;e.g.importScripts&&(t=e.g.location+"");var r=e.g.document;if(!t&&r&&(r.currentScript&&(t=r.currentScript.src),!t)){var n=r.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&(!t||!/^http(s?):/.test(t));)t=n[o--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e.p=t})(),e.p=window.wcpayAssets.url,(()=>{const e=(e,t,r)=>{const n=document.createElement("option");return n.value=t,n.text=r,e.appendChild(n),n};(({gateway:t,table:r,metaKey:n,tokens:o,defaultOptionText:a})=>{const i=`_payment_method_meta[${t}][${r}][${n}]`,c=document.getElementById(i),s=o.some((e=>e.tokenId.toString()===c.value));if(!c||"SELECT"===c.tagName)return;const l=document.createElement("select");if(l.id=i,l.name=i,!s){const t=e(l,"",a);t.disabled=!0,t.selected=!0}o.forEach((t=>{e(l,t.tokenId,t.displayName)})),s&&(l.value=c.value),c.parentElement.insertBefore(l,c),c.remove()})(wcpaySubscriptionEdit)})()})();