!function(){"use strict";var e={1669:function(e){e.exports=jQuery}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,r),a.exports}r.d=function(e,t){for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e=r(1669);const t=ceranking_widget_convert.customParams,o=ceranking_widget_convert.coinType_Fiat,n=ceranking_widget_convert.coinType_Crypto;let a,c;let l,i,d=0;void 0!==t?(l=t.fromCoin,i=t.toCoin):(l="",i="");let s,u,p,m={},y={},g="",f="",h=0,_=!0,v=30;const b=5;let w=!1;function S(e,r,a,c){let l=0,i=null,d=null;r.amount=r.amount.replace(" ","").replace(",","."),r.coin_type==n&&a.coin_type==o?(l=r.amount*e[r.id][a.id],i=r.custom_id,d=a.id):r.coin_type==o&&a.coin_type==n?(l=1*r.amount/e[a.id][r.id],i=r.id,d=a.custom_id):r.coin_type==n&&a.coin_type==n&&(l=r.amount*e[r.id].usd/e[a.id].usd,i=r.custom_id,d=a.custom_id),r.amount=parseFloat(r.amount),(!r.amount||r.amount<0)&&(r.amount=1);let s="";if(s=ceranking_widget_convert.isAmountRemoved?"/"+ceranking_widget_convert.convertMask.replace("{fromCurrency}",i).replace("{toCurrency}",d).replace("?amount={amount}","")+"/":"/"+ceranking_widget_convert.convertMask.replace("{fromCurrency}",i).replace("{toCurrency}",d).replace("{amount}",d),-1!==s.indexOf("null")&&(s="/"),w&&void 0!==t?.calledFrom&&"oneConverter"!==t.calledFrom&&async function(e,t){return await fetch(e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)})}("/wp-json/ceranking/v2/get-convert-on-exchange",{coinId:r.id}).then((e=>e.json())).then((e=>{let t=document.getElementById("convert-on-exchange-button"),r=document.querySelector('[data-el="currency_convert"]');if(null===t)return!1;let o=t.querySelector("span");void 0!==e.url&&""!==e.url&&void 0!==e.text&&""!==e.text?(t.href=e.url,o.innerHTML=e.text,t.target="_blank",t.style.display="flex",r.classList.contains("hide-by-default")&&(r.classList.remove("hidden"),r.classList.add("hidden"))):(t.style.display="none",t.href="#",o.innerHTML="Not Available Yet",t.target="_self",r.classList.contains("hide-by-default")&&r.classList.remove("hidden"))})),w=!0,a.elem.value=function(e){let t=(e+="").split("."),r=t[0],o=t.length>1?","+t[1]:"";var n=/(\d+)(\d{3})/;for(;n.test(r);)r=r.replace(n,"$1 $2");return r+o}(l),void 0!==t.calledFrom&&"oneConverter"!==t.calledFrom&&("undefined"==typeof ceranking_coin_price_prediction||void 0===ceranking_coin_price_prediction.coinId)){const e=a.elem.closest('[data-el="currency-dropdown-wrap"]').closest('[data-el="c-bic-conversor-input-wrap"]').parentNode.querySelector('[data-el="currency_convert"]');e&&e.setAttribute("href",s)}return N(c)}function L(e){const t=JSON.parse(e.dataset.details),r=e.closest('[data-el="currency-dropdown"]'),n=r.querySelector('[data-el="currency-dropdown-logo"]'),a=e.closest('[data-el="currency-dropdown-wrap"]');t.coin_type==o?n.innerText=t.logo:(n.src=t.logo,n.alt=t.name),r.querySelector('[data-el="currency-dropdown-symbol"]').innerText=t.symbol,a.setAttribute("data-symbol",t.symbol),a.setAttribute("data-id",t.id),a.setAttribute("data-custom_id",t.custom_id),a.querySelector('[data-el="currency-dropdown-field"]').dispatchEvent(new KeyboardEvent("keyup")),a.setAttribute("data-name",t.name)}function q(e){e.closest('[data-el="c-bic-conversor-input-wrap"]').querySelectorAll('[data-el="currency-dropdown-wrap"]').forEach((e=>{e.setAttribute("data-from",0)}));e.closest('[data-el="currency-dropdown-wrap"]').setAttribute("data-from",1)}function E(e,r){let o=t.changeValTableC2C.replace(/{from_amount}/gi,"1").replace(/{from_coin}/gi,e.symbol.toUpperCase()).replace(/{to_coin}/gi,r.symbol.toUpperCase());const n=t.changeValTableC2C,a=t.changeValTableFor;let c=n.replace(/{from_amount}/gi,e.amount).replace(/{from_coin}/gi,e.symbol.toUpperCase()).replace(/{to_coin}/gi,r.symbol.toUpperCase()),l=a.replace(/{from_coin}/gi,e.symbol.toUpperCase()).replace(/{from_amount}/gi,"1"),i=a.replace(/{from_coin}/gi,e.symbol.toUpperCase()).replace(/{from_amount}/gi,e.amount),d=document.getElementById("ChangeInValueTable"),s=d.querySelector("thead tr th:nth-child(2)"),u=d.querySelector("thead tr th:nth-child(3)"),p=d.querySelector("thead tr th:nth-child(4)"),m=d.querySelector("thead tr th:nth-child(5)");s.innerHTML=o,u.innerHTML=l,p.innerHTML=c,m.innerHTML=i}function T(e,t,r){return t=void 0!==t?t:{amount:1},new Promise(((r,o)=>{try{const o=convert_single_rowHistoryTableTemplate;let n=0,a=new Date,c={},l=new Array,i=new Array,d=0,s=0;for(let t in e){let r=new Date(e[t][0]);c[r.toLocaleDateString()]=e[t],r.toLocaleDateString()==a.toLocaleDateString()&&i.push(e[t][1])}for(let e in c)l.push(c[e]);l=l.reverse();let u="";const p=document.querySelector("#ChangeInValueTable tbody");for(let e in l){let r,a=o,c=new Date(l[e][0]).toDateString().split(" "),i=l[e][1],p=0,m=0,y=0,g=0;if(e0?"up":"down",parseInt(e)!==l.length-1&&(n++,n>30||(i=C(i),p=C(p),a=a.replace(/{date}/gi,c[2]+" "+c[1]+" "+c[3]),a=a.replace(/{dayofweek}/gi,c[0]),a=a.replace(/{date_day}/gi,c[2]),a=a.replace(/{date_month}/gi,c[1]),a=a.replace(/{price}/gi,i),a=a.replace(/{price_amount_style}/gi,""),a=a.replace(/{price_change_amount_style}/gi,r),a=a.replace(/{price_change}/gi,p),a=a.replace(/{price_change_percent}/gi,m),a=a.replace(/{price_change_percent_class}/gi,r),a=a.replace(/{price_amount}/gi,y),a=a.replace(/{price_change_amount}/gi,g),u+=a))}p.innerHTML=u;let m=C(Math.max.apply(null,i)),y=C(Math.min.apply(null,i));r({maxAmount:m,minAmount:y,priceChangePercentLast:s,priceChangeLast:d})}catch(e){o(e)}}))}function C(e){if(null===e)return 0;if(e>1||e<-1)return e.toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g,",");let t="";if(e<0&&(t="-",e=Math.abs(e)),void 0!==e){let r=e.toString();if(r.includes("E")||e<1)return r=function(e,t=!0){let r=null;if(null===e)return"0";if(e=e.toUpperCase(),e.includes("E+")){let t=e.split("E+"),o=t[0].split(".");r=o[0]+"0".repeat(Math.abs(parseInt(t[1]))+1)+"."+o[1]}else if(e.includes("E-")&&t){let t=e.split("E-"),o=t[0].split("."),n=o[0]+o[1],a=n.substring(0,4);a=n.length>4&&parseInt(n[4])>5?(parseInt(a)+1).toString():a,r="0."+"0".repeat(Math.abs(parseInt(t[1]))-1)+a}else if(e.includes("E")){let t=e.split("E"),o=t[0].split(".");r=o[0]+"0".repeat(Math.abs(parseInt(t[1]))+1)+"."+o[1]}else if(parseFloat(e)<1&&t){let t=e.split(/0\.(0*)(\d.*)/),o=(t[0]||"")+(t[1]||""),n=t[2]||"";if(n.length>0){let e=n.substring(0,4);e=n.length>4&&parseInt(n[4])>5?(parseInt(e)+1).toString():e,r="0."+(""!==o?"0".repeat(o.length):"")+e}}return r||e}(r),t+r}return 1}function A(t,r,o){let n=void 0!==r?r.symbol.toUpperCase():"",a=void 0!==o?o.symbol.toUpperCase():"",c="1 "+n+" = {point.y} "+a+"";"undefined"!=typeof Highcharts&&Highcharts.chart("convert-price-history",{legend:{enabled:!1},credits:{enabled:!1},chart:{backgroundColor:"transparent",height:300},title:{text:""},subtitle:{},xAxis:{type:"datetime",reversed:e("body").hasClass("rtl")},yAxis:{title:{text:ceranking_convert_single.graph_text_1.replace("%s",n)},opposite:e("body").hasClass("rtl")},responsive:{rules:[{condition:{maxWidth:500},chartOptions:{yAxis:{labels:{align:"left",x:0,y:-2},title:{text:""}}}}]},series:[{type:"line",id:"prices-volume",name:a,data:t,color:"#0ba523",label:{enabled:!1},tooltip:{useHTML:!0,xDateFormat:" %A, %e %b %Y",pointFormat:c}}]})}function x(e,r){let o=t.pageTitle,n=o.includes("{from_symbol}"),a=document.querySelector("h1"),c=n?"{from_symbol}":"{from_coin}",l=n?"{amount}":"{from_amount}",i=n?"{to_symbol}":"{to_coin}",d=n?"{from_name}":"{from_coin_name}",s=n?"{to_name}":"{to_coin_name}";o=o.replace(new RegExp(l),e.amount).replace(new RegExp(c,"g"),e.symbol.toUpperCase()).replace(new RegExp(d,"g"),e.name).replace(/{to_amount}/g,e.amount).replace(new RegExp(i,"g"),r.symbol.toUpperCase()).replace(new RegExp(s,"g"),r.name).replace(new RegExp(l),e.amount),a.textContent=o}function k(e,r,o){if(void 0!==t?.calledFrom&&"oneConverter"===t.calledFrom&&!1===_){const{maxAmount:n,minAmount:a,priceChangePercentLast:c,priceChangeLast:l}=o;let i=t.randomCoins,d=t.historicalTextTitle.replace("{FromCoin}",e.symbol).replace("{ToCurrency}",r.symbol);document.querySelector(".convert-one-block__header_col.historical-title").querySelector("h3").textContent=d;let u,p,m,y,g=t.historicalText;u=e.amount,"crypto"==e.coin_type?(p=s*parseFloat(e.amount),m=s):(p=parseFloat(e.amount)/s,m=1/s),y=C(l),p=C(p),m=C(m),g=g.replace(/{from_amount}/g,u).replace(/{from_coin}/g,e.symbol).replace(/{to_amount}/g,p).replace(/{to_coin}/g,r.id.toUpperCase()).replace(/{random_coin_1}/g,i[0]).replace(/{random_coin_2}/g,i[1]).replace(/{random_coin_3}/g,i[2]).replace(/{timestamp}/g,function(){const e=new Date;return e.getFullYear()+"/"+(e.getMonth()+1).toString().padStart(2,"0")+"/"+e.getDate().toString().padStart(2,"0")+" "+e.getHours().toString().padStart(2,"0")+":"+e.getMinutes().toString().padStart(2,"0")}()).replace("{max_to_amount}",n).replace("{min_to_amount}",a).replace("{price_change_percent}",c+"%").replace("{price_change}",y).replace("{base_exchange}",m),document.querySelector("#page-description").textContent=g}}function M(e,r){let o=e.symbol,n=e.amount,a=r.symbol,c=t.changeInTheValue,l=document.querySelector(".convert-one-block__header_col.change-in-value h3");c=c.replace(/{from_amount}/g,n).replace(/{from_coin}/g,o).replace(/{to_coin}/g,a),l.textContent=c}function F(e,t){return l!==g&&""!==l&&"crypto"===e.coin_type||i!==f&&""!==i&&"crypto"===t.coin_type}function I(e,t){return i!==f&&""!==i&&"fiat"===t.coin_type||l!==g&&""!==l&&"fiat"===e.coin_type}async function H(e,t){return new Promise((async(r,o)=>{try{let o,n=function(e,t){let r="price_"+e.id+"_"+t.id;const o=localStorage.getItem(r);if(null===o)return!1;{let e=JSON.parse(o);const t=new Date,n=new Date(e.timestamp);return(t.getTime()-n.getTime())/6e4>b?(localStorage.removeItem(r),!1):e}}(e,t);if(!1!==n&&null!=n&&"undefined"!==n&&"null"!==n&&"NaN"!==n)o=n.prices;else{let r="/wp-json/ceranking-cg-api/v3/simple/price?"+("crypto"===e.coin_type&&"crypto"===t.coin_type?"ids="+e.id+","+t.id+"&vs_currencies=usd":"crypto"===e.coin_type&&"fiat"===t.coin_type?"ids="+e.id+"&vs_currencies="+t.id:"fiat"===e.coin_type&&"crypto"===t.coin_type?"ids="+t.id+"&vs_currencies="+e.id:"");const n=await fetch(r,{method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded"}});o=await n.json()}const[a,c]="crypto"===e.coin_type?[e.id,t.id]:[t.id,e.id];s=o[a][c],r(o)}catch(e){o(e)}}))}function N(e){let t=e.querySelector('[data-from="0"]');f=t.getAttribute("data-id");let r,o,n=t.getAttribute("data-custom_id"),a=t.getAttribute("data-currency_type"),c=t.querySelector('[data-el="currency-dropdown-field"]').value,l=t.querySelector('[data-el="currency-dropdown-field"]');if("fiat"===a){r=t.querySelector('div span[data-el="currency-dropdown-logo"]').textContent;const n=e.querySelectorAll('li[data-el="currency-dropdown-list-item"]');for(const e of n){const t=JSON.parse(e.getAttribute("data-details"));if(t.id===f){o=t.name;break}}}else r=t.querySelector('div img[data-el="currency-dropdown-logo"]').getAttribute("src"),o=f.toUpperCase();let i=t.getAttribute("data-symbol").toUpperCase();return{amount:c,id:f,custom_id:n,coin_type:a,elem:l,symbol:i,logo:r,name:o}}async function U(e,t,r,o=!1){return new Promise(((o,n)=>{let a,c,l;"crypto"==e.coin_type?(a=e.id,c=t.id):(a=t.id,c=e.id);let i=function(e,t){let r=e.id+"_"+t.id;const o=localStorage.getItem(r);if(null===o)return!1;{let e=JSON.parse(o);const t=new Date,n=new Date(e.timestamp);return(t.getTime()-n.getTime())/6e4>b?(localStorage.removeItem(r),!1):e}}(e,t);!1===i||null==i||"undefined"===i||"null"===i||"NaN"===i?fetch("/wp-json/ceranking-cg-api/v3/coins/market_chart?coinId="+a+"&vs_currency="+c+"&days="+r,{method:"GET",headers:{"Content-Type":"application/json"}}).then((e=>e.json())).then((n=>{for(let r in n.prices)"fiat"===t.coin_type?n.prices[r][1]=parseFloat(n.prices[r][1]):"fiat"==e.coin_type&&(n.prices[r][1]=1/parseFloat(n.prices[r][1]));l=n.prices,function(e,t,r,o){let n=e.id+"_"+t.id+"_"+o;const a=new Date,c={prices:r,timestamp:a.getTime()};localStorage.setItem(n,JSON.stringify(c))}(e,t,l,r),o(l)})).catch((e=>{console.error(e),n(e)})):o(i.prices)}))}!1===document.querySelector("body").classList.contains("cer-convert-widget-inited")&&(!function(){const e=document.querySelectorAll('[data-el="currency-dropdown"]'),t=document.querySelectorAll('[data-el="currency-dropdown-list-item"]');e&&e.forEach((e=>{e.addEventListener("click",(e=>{if("input"===e.target.nodeName.toLocaleLowerCase())return!1;const t=e.currentTarget,r=t.querySelector('[data-el="currency-dropdown-list"]'),o=t.querySelector('[data-el="currency-dropdown-arrow"]');if(t.classList.toggle("active"),r)if(r.classList.contains("hidden")){const e=document.querySelectorAll('[data-el="currency-dropdown-list"]'),t=document.querySelectorAll('[data-el="currency-dropdown-arrow"]');e.forEach((e=>{e.classList.add("hidden")})),t.forEach((e=>{e.classList.remove("rotate-180")})),o.classList.add("rotate-180"),r.classList.remove("hidden")}else o.classList.remove("rotate-180"),r.classList.add("hidden")}))})),t&&t.forEach((e=>{e.addEventListener("click",(async e=>{L(e.currentTarget)}))}))}(),document.querySelectorAll('[data-el="currency-dropdown-clear"]').forEach((e=>{e.addEventListener("click",(e=>{const t=e.currentTarget.previousElementSibling;q(t),t.value="",t.dispatchEvent(new KeyboardEvent("keyup"))}))})),document.querySelectorAll('[data-el="currency-dropdown-field"]').forEach((e=>{e.addEventListener("input",(e=>{const t=e.target;t.value=t.value.replace(/[^0-9.]/g,"").trim(),d=t.value}))})),document.querySelectorAll('[data-el="currency_swap"]').forEach((e=>{e.addEventListener("click",(e=>{const t=e.currentTarget,r=t.parentNode.querySelectorAll('[data-el="currency-dropdown-wrap"]'),o=r[0].querySelector('[data-el="currency-dropdown-field"]'),n=r[1].querySelector('[data-el="currency-dropdown-field"]'),a=r[0],c=r[1];a.classList.contains("order-1")?(a.classList.remove("order-1"),a.classList.add("order-3")):(a.classList.add("order-1"),a.classList.remove("order-3")),c.classList.contains("order-3")?(c.classList.remove("order-3"),c.classList.add("order-1")):(c.classList.remove("order-1"),c.classList.add("order-3")),t.parentNode.dispatchEvent(new CustomEvent("currencySwapped",{bubbles:!1,detail:{field1:{el:o,value:o.value},field2:{el:n,value:n.value}}}))}))})),document.querySelectorAll('[data-el="currency-dropdown-field"]').forEach((e=>{e.addEventListener("input",(e=>{q(e.target)}))})),function(){const e=document.querySelectorAll('[data-el="currency-dropdown-search"]');e&&e.forEach((e=>{e.addEventListener("keyup",(e=>{c&&clearTimeout(c);const t=e.target;c=setTimeout((()=>{const e="val="+t.value+"&filter=coinid-with-fiat",r=ceranking_widget_convert.local_api_url+"filter-data?"+e;fetch(r).then((e=>e.json())).then((e=>{const r=t.closest('[data-el="currency-dropdown-list"]');if(r.querySelectorAll('[data-el="currency-dropdown-list-item"]').forEach((e=>e.remove())),e){e.forEach((e=>{let t=`${e.logo}`,o=convert_widget_rowTemplate;const a=e.logo.replace("/large/","/thumb/");e.coin_type==n&&(t=``),o=o.replace(/{logolink}/gi,a),o=o.replace(/{id}/gi,e.id),o=o.replace(/{custom_id}/gi,e.custom_id),o=o.replace(/{name}/gi,e.name),o=o.replace(/{symbol}/gi,e.symbol),o=o.replace(/{logo}/gi,t),o=o.replace(/{cointype}/gi,e.coin_type),r.insertAdjacentHTML("beforeend",o)}));const t=r.querySelectorAll('[data-el="currency-dropdown-list-item"]');t&&t.forEach((e=>{e.addEventListener("click",(async e=>{L(e.currentTarget)}))}))}})).catch((e=>{console.error("Error on coin search: ",e)}))}),130)}))}))}(),document.querySelectorAll('[data-el="currency-dropdown-field"]').forEach((e=>{e.addEventListener("keyup",(e=>{a&&clearTimeout(a);const r=e.target;a=setTimeout((()=>{const e=r.closest('[data-el="currency-dropdown-wrap"]').parentNode;let o=function(e){let t=e.querySelector('[data-from="1"]');g=t.getAttribute("data-id");let r,o,n=t.getAttribute("data-custom_id"),a=t.getAttribute("data-currency_type"),c=t.querySelector('[data-el="currency-dropdown-field"]').value,l=t.querySelector('[data-el="currency-dropdown-field"]');if("crypto"===a)r=t.querySelector('div img[data-el="currency-dropdown-logo"]').getAttribute("src"),o=g.toUpperCase();else{r=t.querySelector('div span[data-el="currency-dropdown-logo"]').textContent;const n=e.querySelectorAll('li[data-el="currency-dropdown-list-item"]');for(const e of n){const t=JSON.parse(e.getAttribute("data-details"));if(t.id===g){o=t.name;break}}}let i=t.getAttribute("data-symbol").toUpperCase();return{amount:c,id:g,custom_id:n,coin_type:a,elem:l,symbol:i,logo:r,name:o}}(e),n=N(e),a=document.getElementsByClassName("js-change-interval");for(let e=0;e{A(e,o,n),T(e,o,n).then((e=>{k(o,n,e)}))}))}));(m!==o||I()||F())&&(void 0===t?.calledFrom||"oneConverter"===t.calledFrom?(!0===_&&U(o,n,v,!0).then((e=>{A(e,o,n),T(e,o,n).then((e=>{k(o,n,e),_=!1}));let t=document.getElementsByClassName("js-change-interval");for(let e=0;e{if(n=S(r,o,n,e),(l===o.id&&o.amount!==p||!0===_)&&(x(o,n),M(o,n),E(o,n),U(o,n,v,!0).then((e=>{T(e,o,n).then((e=>{k(o,n,e),_=!1}))}))),F(o,n)||I(o,n)){let e={event:"select coin",coinid:"crypto"===o.coin_type?o.id:n.id};void 0!==window.dataLayer&&window.dataLayer.push(e),x(o,n),M(o,n),E(o,n),U(o,n,v).then((e=>{A(e,o,n),T(e,o,n).then((e=>{k(o,n,e),_=!1}))})),function(e,r){fetch("/wp-json/ceranking/v2/fill-coin-to-fiat-table?fromCoinId="+e.id+"&toCoinId="+r.id,{method:"GET"}).then((e=>e.text())).then((o=>{const n=t.convertFromTo,a=document.querySelector("#amountToPrice_From-To"),c=document.querySelector("#amountToPrice_To-From"),d=document.querySelector("#coin-converter-table__crypto"),s=document.querySelector("#coin-converter-table__fiat"),u=document.querySelector("#fiat-converter-table__crypto"),p=document.querySelector("#fiat-converter-table__fiat"),m=document.querySelector("#fiat-converter-table-header"),y=document.querySelector("#coin-converter-table-header"),g=JSON.parse(o),f={};if(f.coinToFiat=g.coinToFiat.replace(/\\/g,""),f.fiatToCoin=g.fiatToCoin.replace(/\\/g,""),m.innerHTML=n.replace(/{from_coin}/g,r.symbol).replace(/{to_coin}/g,e.symbol),y.innerHTML=n.replace(/{from_coin}/g,e.symbol).replace(/{to_coin}/g,r.symbol),d.innerHTML=l.toUpperCase(),s.innerHTML=i.toUpperCase(),u.innerHTML=l.toUpperCase(),p.innerHTML=i.toUpperCase(),a.innerHTML=f.coinToFiat,c.innerHTML=f.fiatToCoin,"fiat"==r.coin_type){const t=document.querySelectorAll("span.converter-table-fiat__logo");for(let e=0;e{console.error(e)}))}(o,n);const r="crypto"===o.coin_type?o.id:n.id;fetch("/wp-json/ceranking/v2/coin-convert-to-fiats?coinId="+r,{method:"GET"}).then((e=>e.text())).then((e=>{document.querySelector('section[data-el="popular-convert-widget"]').innerHTML=e})).catch((e=>{console.error(e)})),function(e,t){l=g,i=f,m=e,y=t}(o,n)}0===h&&(h=o.amount),_=!1})),_=!1,p=o.amount,u=n.amount):H(o,n).then((t=>{n=S(t,o,n,e)})))}),500)}))})),document.querySelectorAll('[data-el="currency-dropdown-wrap"]').forEach((e=>{1==e.getAttribute("data-from")&&e.querySelector('[data-el="currency-dropdown-field"]').dispatchEvent(new KeyboardEvent("keyup")),e.getAttribute("data-currency_type")==n&&e.querySelector('[data-el="currency-dropdown-search"]').dispatchEvent(new KeyboardEvent("keyup"))})),function(){const e=document.querySelectorAll('[data-el="c-bic-conversor"]'),t=e=>{const t=e.querySelectorAll('[data-el="currency-dropdown"]'),r=e.querySelectorAll('[data-el="currency-dropdown-list"]'),o=e.querySelectorAll('[data-el="currency-dropdown-arrow"]');t.forEach((e=>{e&&e.classList.remove("active")})),r.forEach((e=>{e&&e.classList.add("hidden")})),o.forEach((e=>{e&&e.classList.remove("rotate-180")}))},r=r=>{e.forEach((e=>{e.contains(r.target)||t(e)}))},o=r=>{"escape"===r.key.toLocaleLowerCase()&&e.forEach((e=>{t(e)}))};document.addEventListener("click",r),document.addEventListener("keydown",o)}(),document.querySelector("body").classList.add("cer-convert-widget-inited"))}()}();