const n=n=>{let o;try{o=new URL(n)}catch(n){return!1}return"http:"===o.protocol||"https:"===o.protocol},o=n=>{const o=window.location.search;return new URLSearchParams(o).get(n)},t=(n,o,t)=>(n||[]).sort(((n,l)=>-1===t.indexOf(null==n?void 0:n[o])?1:-1===t.indexOf(null==l?void 0:l[o])?-1:t.indexOf(null==n?void 0:n[o])-t.indexOf(null==l?void 0:l[o]))),i=({variants:n,values:o})=>{const t=Object.keys(o);for(const l of n){const n=["option_1","option_2","option_3"].map((n=>l[n])).filter((n=>null!=n));if((null==n?void 0:n.length)===(null==t?void 0:t.length)&&t.every((t=>n.includes(o[t]))))return l}return null},r=n=>{var o;return 429===(null===(o=null==n?void 0:n.data)||void 0===o?void 0:o.status)},l=(n,o)=>{const t=parseInt(n);return!(o&&((null==o?void 0:o.ad_hoc_max_amount)||(null==o?void 0:o.ad_hoc_min_amount))&&((null==o?void 0:o.ad_hoc_max_amount)&&t>(null==o?void 0:o.ad_hoc_max_amount)||(null==o?void 0:o.ad_hoc_min_amount)&&t<(null==o?void 0:o.ad_hoc_min_amount)))};export{o as a,r as b,n as c,i as g,l as i,t as s};